How to get full list of users and delete a particular user. Please help me. our indico instance details are as follows.
Server default language (en_GB)
Indico version installed (2.0)
Python version used (2.7.5)
Postgres version used (9.6.6)
Hey, you could use the indico shell
and then use some code to find and remove a user:
User.query.all()
<- returns all the users
User.query.filter(criteria_here).one()
<- find a user matching criteria
as soon as you get an instance of a User
representing your user you can set is_deleted
property to “delete it”
user.is_deleted = True
db.session.commit()
Hi,
It is possible to list all of the users on the GUI end? I am trying to clean my users and see if there are any roles such as speakers, submitters, conveners and etc. associate with the user account. May I know how to go about with that? Thank you.
Jacky
Hey,
unfortunately there is no easy way to do that using the web interface of Indico. I think it would be better
to write a custom script to do exactly what you need. It shouldn’t be too hard since most of the data that you probabably need is accessible from the User
class (https://github.com/indico/indico/blob/master/indico/modules/users/models/users.py#L157). So it is a matter of finding a specific user and then looking at its relationships to other objects/entities.
Regards,
Michal