[Users] deactivate an account

samuel samu60 at gmail.com
Thu Jan 5 09:16:52 CET 2006


To add a user to a group you can either access directly the database
or use the openserctl script:

#openserctl acl grant <username> <group>
ex: openserctl acl grant bob at biloxi.com inactive

Later in your config use
is_user_in(header, group): you can check if the user identified in the
Req-URI, in the From, or the username used for authentication belongs
to the especified group .

if(is_user_in("credentials","inactive")) {
         #the user is in the group inactive....
        #you can setflag or return an error message....
}


Please, check the speling of the commands because I am not 100% sure
if they are written exactly as they are here or which version are you
using...

Hope it helps,

sam



2006/1/5, unplug <maillisting at gmail.com>:
> Could you show me an example?
>
> On 1/3/06, Iqbal <iqbal at gigo.co.uk> wrote:
> > Hi
> >
> > Just create a route, which matches the flag set by a grp entry, and then
> > route that to a de-activated message. I then simply automate this by
> > checking credit limits
> >
> > Iqbal
> >
> > unplug wrote:
> >
> > >I am looking for the 2nd option.  I found that there is a table called
> > >grp.  Do you mean to make a group in this table?  How can I add the
> > >user in it and check before registration or making a call?  Could you
> > >show me how?
> > >
> > >There is a field called 'flag' In the table of 'subscriber'.  What is
> > >the meaning of it?  I also find a table called 'pending'.  It's
> > >structure almost same as the table 'subscriber'.  What is the usage of
> > >'pending' table?
> > >
> > >On 12/27/05, Daniel-Constantin Mierla <daniel at voice-system.ro> wrote:
> > >
> > >
> > >>Hello,
> > >>
> > >>On 12/27/05 08:31, unplug wrote:
> > >>
> > >>
> > >>>Hi ,
> > >>>  Does anyone know how can I deactivate an account?  Does openser
> > >>>already implement that function to deactivate an account, how?
> > >>>
> > >>>
> > >>>
> > >>what you expect from deactivation? To remove the user's profile? Or just
> > >>to mark it to be unable to register? For the first option, you can use
> > >>"openserctl rm" and for the second you can do it via groups - make a
> > >>group 'inactive', add the user in it and check before it tries to
> > >>register or to make a call.
> > >>
> > >>Cheers,
> > >>Daniel
> > >>
> > >>
> > >>
> > >>>_______________________________________________
> > >>>Users mailing list
> > >>>Users at openser.org
> > >>>http://openser.org/cgi-bin/mailman/listinfo/users
> > >>>
> > >>>
> > >>>
> > >>>
> > >
> > >_______________________________________________
> > >Users mailing list
> > >Users at openser.org
> > >http://openser.org/cgi-bin/mailman/listinfo/users
> > >
> > >.
> > >
> > >
> > >
> >
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>




More information about the Users mailing list