Anyone know of a way to "lock" a user's account?

Anyone know of a way to "lock" a user's account?

by Bryce Thornton -
Number of replies: 2
It would be nice to be able to able to "lock" a user's account from accessing Moodle.  I know you can unenroll students from courses and you can also delete a user's account, but what do you do when you want to maintain the user's data?  For instance, this would be nice at the beginning of a school year when you want to get all the data ready to go on the server, but don't want the users to have access to it yet.  It would also be nice to lock an account for a period of time after a student leaves the school.  This would allow you to easily give the student access if they return to the school in the near future.

Has this been implemented somewhere?  Would it be useful for anybody else?

It could probably be done by adding a "status" field to the mdl_user table.  Other statuses could be added as well.
Average of ratings: -
In reply to Bryce Thornton

Re: Anyone know of a way to "lock" a user's account?

by Jeffery Watkins -
Bryce,

You could change their password and e-mail address.  This should keep them out and Moodle from emailing them instructions to change it back.

Jeff
In reply to Bryce Thornton

Re: Anyone know of a way to "lock" a user's account?

by Zbigniew Fiedorowicz -
You could also write a trivial nologin authentication plugin which just returns false, and then set the student's authentication field to this method.