Thomas Bruederli <tho...@roundcube.net> wrote: > Sven Hartge wrote: >> Sven Hartge <s...@svenhartge.de> wrote:
>>> Now I only need a way to overwrite/set/force the identity of the >>> user from the LDAP server on every login of a user. >> OK. After implementing a very simple test-plugin, which just hooks >> user2email and sets $args['email'] to a fixed value, I discoverd that >> user2email is only called during create() from rcube_user.php. >> Reading the changelog this was made during the outsourcing of the >> virtuser_* functions into their own separate plugins. > All the hooks you listed so far are only called once then the user > logs in for the first time. Well, they were the most obvious ones to me at the time I looked. > I suggest to use the 'login_after' hook to verify/update a user's > identities on login. That hook is also available in 0.9.5 so don't > worry about that. > So in 'login_after' for example, you have access to the user object > with its identities like this: > $user = rcmail::get_instance()->user; > foreach ($user->list_identities() as $identity) { > // check and update here > } Aha! I did look at login_after, but just at the possible return values. I did not comprehend that I am able to access the user object and change it accordingly. (Which is purely my fault, it is clearly stated on the wiki page.) Thanks Thomas, this helps me out a great deal. Back to the $editor! BTW: What is the preferred method of writing some information into a log file to aid debugging? I guess it is as simple as write_log("log_name","log content"). Grüße, Sven. -- Sigmentation fault. Core dumped. _______________________________________________ Roundcube Users mailing list users@lists.roundcube.net http://lists.roundcube.net/mailman/listinfo/users