The Elearning Community • suspend users
Page 1 of 1

suspend users

Posted: Mon Jul 08, 2019 6:25 am
by cao
I created 40 users using a cvs file.
the cvs file fields: username, firstname, lastname, email, password, suspend.
suspend is an additional field create using -->Setting-->Additional fields.
the Field name = suspend Field category = yesno
suspend is a yesno field (Boolean), yes=1 no=0 .
I can see the suspend field in the database, in core_field table.
I am trying to suspend 20 users at the same time, using the cvs file.
But, is not working. How to suspend or deactivated more than one users
using a cvs file.
Thank You

Re: suspend users

Posted: Mon Jul 08, 2019 7:33 am
by max
Hii Cao,

additional fields are just labels, they cannot be used to perform actions. Using that field you can easily identify the 20 users that you want to suspend, and thus you can
- search for them (via advandced search)
- select them all
- suspend them all in bulk
It's still a manual activity, but at least you can perform massive actions.

If you want to automatically suspend (or add, or delete) users you normally do it by hooking your LMS to an external application, such as a HR management system. If users are suspended there, they will be suspended in the LMS. You do that either via API or via connectors.

Re: suspend users

Posted: Mon Jul 08, 2019 7:52 am
by cao
Thank you for the info.
Now, any info on performing action or an example.
The suspend button should be able to communicate with the db and deactivated the users.
I hope that functionality is on the roadmap.
Thank

Re: suspend users

Posted: Mon Jul 08, 2019 8:01 am
by max
Hi Cao,

the suspend button already does that....

Re: suspend users

Posted: Mon Jul 08, 2019 8:43 am
by cao
What is the name of the field on the db, that the suspend button write to.
I look all over the db for word like action, suspend, deactivated, activate, reactivate.
But no cigar, I found nothing except in the table core_lang_translate.

Re: suspend users

Posted: Mon Jul 08, 2019 11:21 am
by max
Hi, sorry but I don't understand why you are looking for that. The suspend button already does what you need. I suppose the table you're referring to would be core_XXXXXX_user, anyway

Re: suspend users

Posted: Mon Jul 08, 2019 11:34 am
by alfa24
The field name you're searching for is "valid", in the core_user table.

Re: suspend users

Posted: Tue Jul 09, 2019 4:27 am
by cao
Thank You, for the info
I came across the following site: http://phpcrossref.com/learning/
They are using Forma ver 1.1 maybe, they can upgrade to ver 2.2
Thank You All

Re: suspend users

Posted: Tue Jul 09, 2019 4:30 am
by cao
The new website look pretty....
I like it.

Re: suspend users

Posted: Tue Jul 09, 2019 9:00 am
by alfa24
You can use phpxref for your own project. Follow instructions here: http://phpxref.sourceforge.net/