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

James Walker walkah at walkah.net
Mon Jan 30 16:06:16 UTC 2006


On 1/30/06 10:39 AM, Mark Fredrickson wrote:
>>     * 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
> compatible.
> 
> 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.

on that front - a set of hooks for role insert/update/delete would be 
real handy.

-- 
James Walker :: http://walkah.net/ :: xmpp:walkah at walkah.net


More information about the development mailing list