xTuple.com xTupleU Blog & News Customer Support

Mass revoke privledges from inactive users

Here’s a little snippet to mass revoke privs for all of your inactive users:

BEGIN;
SELECT revokepriv(usrpref_username, priv_id) FROM usrpref, priv WHERE usrpref_name='active' AND usrpref_value='f';
COMMIT;

Enjoy!

Perry Clark

1 Like