[development] Assigning user to roles programatically -- whatfinally worked

Mark Fredrickson mfredrickson at ppmns.org
Mon Jan 30 15:39:44 UTC 2006

>     * On $op == 'insert',  Adrian approach doesn't work, because
>       user_save has already done everything it will ever do with the
>       user_roles table.  So in that case, you need to do what Khalid
>       suggests:  INSERT a row into the user_roles table.

Is anyone else bothered that you have to make db call to do this? Where's
the API fever when we need it? This code breaks on a data base schema
change. Abstracting the call to an API function makes code future

Of course, talk is cheap, code is gold... So I'll shut my big mouth for now.
But for those of you going to Vancouver, please, please put roles API on the
road map for 4.8.


More information about the development mailing list