Developer Forum »
Deactivate vs locking users
36 posts

Hi devs!

What would be the difference between locking a user (setting his Lock property to true) and deactivating the whole user node? As far as I understand locking is more about blocking the user from logging into the system, while deactivating has more impact on how this user is treated by Webnodes. Can you explain a bit more around both of these approaches?

 

Regards,

Andrzej

 

181 posts

Hi!

Locking a user prevents the user from logging in, but the SystemUser node is not in a special mode in the system, so it will still be returned in queries and so on. So for example, if you have a Employee content class, and you lock one of the employees, the employee will not be able to login, but it will still be listed in the employee page.

Deactivating a user means that the user is excluded from all regular queries (where you don't specify that you want to include deactivated content). This means that in the example above, a deactivated employee will not be able to login (the query to see if a user is matching the specified credentials will not return a match), and the employee will not be listed in the employee page.

 

1