[dev] Username in Horde
B.Baransel BAĞCI
bagcib at itu.edu.tr
Sun Feb 5 00:01:21 UTC 2012
I have already tried this, but still i can't getting username. In
preauthenticate hook, $userId and $credentials are functions parameters. I
think $userId is contains username, but when hook function called on login,
$userId is empty.
Here is my preauthenticate function:
------------
public function preauthenticate($userId, $credentials)
{
if($userId=='')
return false;
$GLOBALS['TEMPXYZ']['username'] = $userId;
return true;
}
--------------
I'm trying to pass username to temp global and using it in backend.php.. It
works when i assign username manually as $GLOBALS['TEMPXYZ']['username'] =
'testusername';
Thanks for all
Regards
B.Baransel BAĞCI
Istanbul Technical University
Office of Information Technologies
System Support Group
-----Original Message-----
From: dev-bounces at lists.horde.org [mailto:dev-bounces at lists.horde.org] On
Behalf Of Michael M Slusarz
Sent: Thursday, February 02, 2012 8:27 PM
To: dev at lists.horde.org
Subject: Re: [dev] Username in Horde
Quoting Michael J Rubinsky <mrubinsk at horde.org>:
> Quoting "B.Baransel BA?CI" <bagcib at itu.edu.tr>:
>
>> Hi again;
>>
>> I think "$GLOBALS['registry']->getAuth()" holds authenticated username.
>> Before authentication, this method gives empty string.
>>
>> In our design, users distributed two imap servers by their Active
>> Directory group. In backend.local.php, i have a php code that takes
>> username and search with ldap_search. According to result of ldap
>> search, imap server is assigned.
>
> This doesn't sound like it belongs in backends.php. This should be
> done in a hook. Don't have code in front of me at the moment to
> recommend which hook, but it's one of the preauthentication hooks I
> believe. Perhaps another dev can chime in here for you.
preauthenticate hook
michael
___________________________________
Michael Slusarz [slusarz at horde.org]
--
Horde developers mailing list
Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail:
dev-unsubscribe at lists.horde.org
More information about the dev
mailing list