cancel
Showing results for 
Search instead for 
Did you mean: 

How to know when user logs in for first time?

andrewriver
Champ in-the-making
Champ in-the-making
Hello!

I need to make some stuff when one user logs in for first time (first login) at alfresco share. There is any way in java to detect this issue?

Thanks!
2 REPLIES 2

romschn
Star Collaborator
Star Collaborator
Just one way I could think of is, you may keep one property on user.

You may have a logic to see if this property on user is not set - it is first login and then set the value of it.

When the user logs in for next time, the value for this property would be already set. Hence, you will be able to identify this was not the first time login. This user has already logged in earlier.

Hope this helps.

Thanks,

andrewriver
Champ in-the-making
Champ in-the-making
Hi romschn,

When you say a "property" on user, is this a new property inside the user model?? Ithink it would be a little 'dangerous' to change the original alfresco model… Isn't it?

I think maybe there would be another option to check that.

Thanks for your answer!