This question has been flagged
2 Replies
4034 Views

I am admin user, i wantto restrict some of my users to login for some period. 

When i give access to them, they can login o their account. Where should i update the code?

Any solution for this?

I know the active checkbox present in users form. but dont want to use that method.

I want to add a date field in users table. Before login we want to chack that expire date. if expire date same as current date then expire, the use will not have the permission to login the database.

Avatar
Discard
Best Answer

I would say you have 2 options

  1. you dectivate the user you want to restrict access (and later reactivate him if you want)
  2. you change the password (and uncheck the option enabling users to request reset of password from the login page)

both I have not tested. Especially what happens once you deactivate a user and whether there might be any problem when reactivating him. I would suggest to test the method you want to use with a test user first to see whether it works fine or not

Avatar
Discard
Author

Thanks for reply. Database is in remote machine, i will set a particular date in the database. When the date comes the user should deactivate. How can i implement this?

Best Answer

Hi, all users have "Active" status check boks in the settings menu. You can use this check boks to deactivate user. 

Avatar
Discard
Author

Thanks for reply. Database is in remote machine, i will set a particular date in the database. When the date comes the user should deactivate. How can i implement this?

@Remya Try creating a scheduled action which will check today's date is equal to date you want to set you specified user status to deactive
I recommend it to acheive via custom module