[horde] Username frombackend and tobackend

Jan Schneider jan at horde.org
Sat Aug 5 00:51:10 PDT 2006


Zitat von sbbe83 <sbbe83 at verizon.net>:

> Sorry I guess I didn't really provide a question. My question is how  
>  can I use a hook to take the username in the sql authentication   
> backend that is in the format of username at domain.com and remove the   
> @domain.com so that users do not need to use the full   
> username at domain.com as their login information? I had tried a few   
> things (previous post) and nothing seems to work. Any ideas? Thanks.

What you probably want is to let IMP provide authentication for Horde  
and use IMP's vinfo hook instead.

>> Date: Fri, 04 Aug 2006 22:30:50 +0200
>> From: Jan Schneider <jan at horde.org>
>> Subject: Re: [horde] Username frombackend and tobackend
>> To: horde at lists.horde.org
>> Message-ID: <20060804223050.3r01jsmpcs4kockk at neo.wg.de>
>> Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed"
>>
>> Zitat von Sbbe83 <sbbe83 at verizon.net>:
>>
>>> Hi Everyone,
>>>    I am currently running Horde 3.2-cvs (CVS from 8-1-06) with PHP
>>> 5.1.4, Hmail Server 4.2.2 - build 199, Windows 2000 Advanced Server
>>> with IIS5.0, and Mysql 5.0.22. I am using the authentication system
>>> directly to the table hm_accounts which Hmail uses to store
>>> usernames and passwords. Everything is working fine except for the
>>> fact I have to use username at domainname.com to login to Horde. This
>>> is because Hmail stores the username this way. I want to basically
>>> use a hook to slit the username from the rest of the
>>> @domainname.com. So far I have tried customizing the hook
>>> frombackend and tobackend. So far this is what I have:
>>>
>>> if (!function_exists('_username_hook_frombackend')) {
>>>     function _username_hook_frombackend($userID)
>>>     {
>>>  list($username2, $domain2) = split('@', $userID);
>>>  $username2 = $userID;
>>>  return $userID;
>>>     }
>>> }
>>>
>>> if (!function_exists('_username_hook_tobackend')) {
>>>     function _username_hook_tobackend($userID)
>>>     {
>>>         return $userID;
>>>     }
>>> }
>>>
>>> Since I need to return the userid back to what the database has in
>>> the table I used the tobackend to basically just grab the userid.
>>> Now I am sure lots of you will look at this and find a million
>>> errors but I have really just started learning PHP, so take it easy
>>> on me. I am not even sure if this is possible (I think it should
>>> be), but any help at all would help me tremendously. Thanks.
>>
>> Did I miss a question?
>>
>> Jan.
>>
>> -- 
>> Do you need professional PHP or Horde consulting?
>> http://horde.org/consulting/
>>
>>
>>
>> ------------------------------
>
> -- 
> Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org



Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the horde mailing list