[shib_auth] Hook when user account is created
Kristof Bajnok
bajnokk at niif.hu
Tue May 3 17:35:34 CEST 2011
On Tuesday 03 May 2011 10:51:37 Markus Broman wrote:
> I'm trying to assign roles to users upon login, depending on a http request
> I make from a custom module.
>
> What I want is to hook onto hook_user and if case: "insert", add roles to
> the user. So that when the user logs in the first time he belongs to the
> roles. This doesn't work.
This _should_ work. If you are sure that the insert run is not run on
registering a new user, then this is a bug, please report it.
In fact, it is user_external_login_register() which calls user_save(), which
calls 'insert' hook on creating new users.
> Is there a hook or something in Shibboleth authentication where I can make
> these changes?
The module should call normal user hooks: insert, login, after_update. If it
fails to call them, then this is most probably a bug.
Kristof
More information about the shib_auth
mailing list