Fórum
LR6.2CEGA6 MySQL clearing non admin users
darren rose, modificado 7 Anos atrás.
LR6.2CEGA6 MySQL clearing non admin users
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens Recentes
Hi,
LR6.2CEGA6
I need to remove all users that do not have Administrator role.
Preference would be a groovy script run in the admin console.
regards
LR6.2CEGA6
I need to remove all users that do not have Administrator role.
Preference would be a groovy script run in the admin console.
regards
Amos Fong, modificado 7 Anos atrás.
RE: LR6.2CEGA6 MySQL clearing non admin users
Liferay Legend Postagens: 2047 Data de Entrada: 07/10/08 Postagens Recentes
Are you familiar with using the Liferay services in groovy?
You can get all users with UserLocalServiceUtil.getUsers(-1, -1).
Then just iterate over them and then iterate over user.getRoles() to see if they are an administrator.
You can get all users with UserLocalServiceUtil.getUsers(-1, -1).
Then just iterate over them and then iterate over user.getRoles() to see if they are an administrator.
darren rose, modificado 7 Anos atrás.
RE: LR6.2CEGA6 MySQL clearing non admin users
Regular Member Postagens: 215 Data de Entrada: 04/04/15 Postagens RecentesAmos Fong:
Are you familiar with using the Liferay services in groovy?
You can get all users with UserLocalServiceUtil.getUsers(-1, -1).
Then just iterate over them and then iterate over user.getRoles() to see if they are an administrator.
Hi, yes, that works, thanks