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

Asif Iqbal iqbala at qwestip.net
Fri Oct 24 16:18:06 EDT 2003


On Fri, 24 Oct 2003, Ruslan U. Zakirov wrote:

> > 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
> >
> Slightly harder:
>
> select distinct u.* from Users u, Principals p, Principals p1, Groups g,
> CachedGroupMembers cm where u.id = p.id and p.Disabled = 0 and
> p.PrincipalType = 'User' and g.Domain = 'SystemInternal' and g.Instance
> = '' and g.Name = '' and g.Type = 'Privileged' and p1.id = g.id and
> cm.MemberId = p.id and p1.id = cm.GroupId;
>
> :)

Thats perfect. Thanks a million

>
>




More information about the rt-users mailing list