[rt-users] How to look for dsabled user in the database

Asif Iqbal iqbala at qwestip.net
Fri Oct 24 12:04:00 EDT 2003


On Fri, 24 Oct 2003, Asif Iqbal wrote:

> On Thu, 23 Oct 2003, Ruslan U. Zakirov wrote:
>
> > Asif Iqbal wrote:
> > > Hi All
> > >
> > > I know how to look for disabed user in the RT gui. But how do I look for the
> > > same in the rt3 database ? What flag should I look for ?
> > select u.Name from Users u, Principals p where u.id = p.id and
> > p.Disabled = 1 and p.PrincipalType = 'User';

I noticed if I choose p.Disabled = 0 it actually picks up the users whose
account has "Let this user be granted rights" unchecked. Is there anyway to
avoid that ?

I like to grep only the users whose account in Access control box has both of
the follwoing options *must* be checked

"Let this user access RT"
"Let this user be granted rights"

Something like this:

select EmailAddress from Users where "Let this user access RT" = 1 and "Let this
user be granted rights" = 1

Would you et al. know what mysql statement(s) would accomplish that ?

Thanks a lot

- Asif




More information about the rt-users mailing list