What is the difference between suspending and soft-deleting a user?

What is the difference between suspending and soft-deleting a user?

by Mark Thornton -
Number of replies: 9

In the database, in the mdl_user table, I can set deleted = 1 or suspended = 1.

Both lock the user out of the Moodle website.  So what is the difference between these two flags?

Average of ratings: Useful (1)
In reply to Mark Thornton

Re: What is the difference between suspending and soft-deleting a user?

by Christopher Murad -

When you delete a user in the moodle GUI the deleted flag is set to 1 - not actually removed from the database -  if you wanted to suspend a user from the site you would actually set the user auth to no-login


It appears to me that the suspended field is not in a stock moodle database, perhaps added with certian types of authentication? I tried to do some digging but didn't come up with anything useful.

 

Hope this helps

Thanks

Chris

In reply to Mark Thornton

Re: What is the difference between suspending and soft-deleting a user?

by Johnny America -
I have the same question... whats the difference between setting deleted = 1 and suspended = 1?
In reply to Johnny America

Re: What is the difference between suspending and soft-deleting a user?

by Susana L. -

same here...

In reply to Johnny America

Re: What is the difference between suspending and soft-deleting a user?

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Deleted users loose email, username, all preferences, enrolments, group membership, grades - as much as possible. The only exception is data such as forum posts or wiki entries which we can not delete because data of other users depend on it.

Suspended users can not login, but teacher can enrol them, etc. It is a temporary prevention of login. They also do not receive any messages from moodle.
Average of ratings: Useful (6)
In reply to Petr Skoda

Re: What is the difference between suspending and soft-deleting a user?

by Chris Fryer -

When a suspended user attempts to log in, they get the same message ("Invalid login, please try again") as someone who enters an incorrect password, or attempts to log in with a disabled account, or a non-existent account.  Is that deliberate?  By which I mean also to ask: would it not be useful to give users whose accounts have been suspended a message to that effect?

In reply to Chris Fryer

Re: What is the difference between suspending and soft-deleting a user?

by Melissa Tommarello -

To me this has the possibility for causing quite a lot of confusion to users.  It would be great if suspening an account produced a different message when users attempt to log-in.  As far as I can tell this doesn't look possible without some customising.

In my organisation people often leave and then come back and it would be great if we could just reactive suspended accounts.  However, if a user doesn't realise there account is suspend I image that is going to cause us problems.  Chris has this been an issue for you?

In reply to Melissa Tommarello

Re: What is the difference between suspending and soft-deleting a user?

by Constance Horne -

I am having a problem where a Site News post that sends email to everyone is sending email to DELETED users.

So the statement above that deleted users "loose email ..." is not a correct statement. I am on v2.4.0. I am also looking for a FIX!

In reply to Constance Horne

Re: What is the difference between suspending and soft-deleting a user?

by Guillermo Madero -

Hi Constance,

The statement is correct, however, it could be that the deleted field was set manually and then the deletion process was not executed. You could try to set the deleted field to zero and then delete the user through Moodle.

In reply to Guillermo Madero

Re: What is the difference between suspending and soft-deleting a user?

by Constance Horne -

I will try this in dev.

Why would it matter if they were originally set up as having LDAP authentication - because that method was abandoned during the original testing.

Also, when querying the users in the system, moodle does not find those ldap users either.