Re: SAM not using full email address

John Dalbec <[email protected]> Mon, 13 Dec 2004 17:05:42 -0500
Newsgroups gmane.comp.horde.sam
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------090409020102020000080703
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

See attached message

--------------090409020102020000080703
Content-Type: message/rfc822;
	name="Re: [horde] Horde installation for users in multiple domains"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
	filename="Re: [horde] Horde installation for users in multiple domains"

Return-path: <[email protected]>
Envelope-to: [email protected]
Delivery-date: Mon, 25 Oct 2004 19:37:28 -0400
Received: from exim by mail03.cc.ysu.edu with spam-scanned (Exim 4.43)
	id 1CMEP1-00047n-Ta
	for [email protected]; Mon, 25 Oct 2004 19:37:28 -0400
Received: from mail01.cc.ysu.edu ([150.134.10.201] ident=exim)
	by mail03.cc.ysu.edu with esmtps (TLSv1:DES-CBC3-SHA:168) (Exim 4.43)
	id 1CMEP1-00047j-Lb
	for [email protected]; Mon, 25 Oct 2004 19:37:27 -0400
Received: from 12-221-245-223.client.insightbb.com ([12.221.245.223]
	helo=ysuwebshield01.ysu.edu)
	by mail01.cc.ysu.edu with smtp (Exim 4.43) id 1CMEP0-0001vd-Pr
	for [email protected]; Mon, 25 Oct 2004 19:37:27 -0400
Received: from 12-221-245-223.client.insightBB.com(12.221.245.223) by
	ysuwebshield01.ysu.edu via csmap 
	id da31ba4a_26de_11d9_839b_0002b3c8850b_12269;
	Mon, 25 Oct 2004 23:37:37 +0000 (UTC)
Received: by mail.llosa.net (Postfix, from userid 503)
	id 5D18113BF54; Mon, 25 Oct 2004 18:40:11 -0500 (CDT)
Received: from 10.10.100.239 ([10.10.100.239]) by mail.llosa.net (Horde)
	with HTTP for <[email protected]>; Mon, 25 Oct 2004 18:40:11 -0500
Message-ID: <[email protected]>
Date: Mon, 25 Oct 2004 18:40:11 -0500
From: [email protected]
To: John Dalbec <[email protected]>
Subject: Re: [horde] Horde installation for users in multiple domains
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
In-Reply-To: <[email protected]>
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="=_1wlgtqjbvnc0"
Content-Transfer-Encoding: 7bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Scan-Signature: dcb8f806dd999dde73efac87797d281d
X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on mail01.cc.ysu.edu
X-Spam-Status: No, score=0.2 required=5.0 tests=FORGED_RCVD_HELO, NO_REAL_NAME 
	autolearn=no version=3.0.0
X-Spam-Level: 

This message is in MIME format.

--=_1wlgtqjbvnc0
Content-Type: text/plain;
	charset=ISO-8859-1;
	format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

John,
Thanks a million for your help.  That fixed it.  Now it sets the correct
username for different domains.

I used in horde/config/hooks.php:

if (!function_exists('_sam_hook_username')) {
   function _sam_hook_username($userid)
     {
       return Auth::getAuth();
     }
}

I am using:
Horde: 3.0-cvs
Imp: 4.0-cvs
Sam: 0.1-cvs


Diego


Quoting John Dalbec <[email protected]>:

> [email protected] wrote:
>
>> If I login as [email protected] and set $conf['hooks']['username'] = 
>> false; then
>> it SAM uses just user.
>>
>> If I login as [email protected] and set $conf['hooks']['username'] = 
>> true; and put
>> this hook in horde/config/hooks.php:
>>
>>
>>
>> if (!function_exists('_passwd_hook_username')) {
>>     function _passwd_hook_username($userid)
>>     {
>>         return $userid . '@example.com';
>>     }
>> }
>>
>>
>> Then it will actually use [email protected] which is not bad if I am 
>> only hosting
>> one domain and I can hard code it.
>>
>> Can anybody please tell me what the hook should be for Sam to use the full
>> user@domain username instead of the domain part being stripped.
>
> I don't use domains myself so I can't test anything.  What happens if you use
> the following hook?
>
> if (!function_exists('_passwd_hook_username')) {
>      function _passwd_hook_username($userid)
>      {
>          return Auth::getAuth();
>      }
> }
>
> Which Horde version are you using?
> John
>
>>
>> Thanks in advance.
>>
>> Diego
>>
>>
>>
>>
>> Quoting John Dalbec <[email protected]>:
>>
>>> [email protected] wrote:
>>>
>>>> Has anybody been able to get the Sam hook to work so that the user is
>>>> user@domain instead of just user?
>>>>
>>>> All other modules work with now problem except for Sam.  Any help would be
>>>> appreciated.
>>>>
>>>> Thanks in advance.
>>>>
>>>> Quoting Thomas O'Brien <[email protected]>:
>>>>
>>>>> Quoting [email protected]:
>>>>>
>>>>>> Thomas,
>>>>>> Thanks I got it to work for passwd.  I am still having difficulties
>>>>>> with the one
>>>>>> for sam.
>>>>>>
>>>>>> I have in horde/sam/config/conf.php :
>>>>>> $conf['hooks']['username'] = true;
>>>>>>
>>>>>> and then in horde/config/hooks.php :
>>>>>>
>>>>>> if (!function_exists('_sam_hook_username')) {
>>>>>>      function _sam_hook_username($horde_uid)
>>>>>>      {
>>>>>>          if (strstr($horde_uid, '@')) {
>>>>>>              $parts = explode('@', $horde_uid);
>>>>>>              return $parts[0];
>>>>>>          } else {
>>>>>>              return $horde_uid;
>>>>>>          }
>>>>>>      }
>>>>>> }
>>>
>>>
>>> This hook code strips off the @domain part from the username if it 
>>> is present.
>>> Maybe if you set $conf['hooks']['username'] = false; SAM will do 
>>> what you want.
>>> HTH,
>>> John
>>>
>>>>>>
>>>>>>
>>>>>> But still does not work.  It fails to add the @domain part to the
>>>>>> username.  Any
>>>>>> ideas why is not working?
>>>>>>
>>>>>
>>>>> Honestly, no. But this thread is in the right place and I'm sure 
>>>>> someone here
>>>>> does know. In the mean time maybe search the archives.
>>>>>
>>>>> Thomas
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> ----------------------------------------------------------------
>>>> This message was sent using IMP, the Internet Messaging Program.
>>>>
>>>
>>>
>>
>>
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>>
>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


--=_1wlgtqjbvnc0
Content-Type: application/pgp-keys
Content-Description: PGP Public Key
Content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IKkSM3AWG6riBDpWfIIDERTRSwyXdpwC3CeuBZVOH9aEBS3M
SdL2Xj/BAM0Kys8wk0Ybn1t05Ta8OgjkEEbGfXJbMK4WRRI4yxJo9yUlTtz8Ga+j
fWWeRAnea0PND2uIRgQYEQIABgUCQXl7ZQAKCRAkuSnGnEca+Y0PAJ41J40wnTxw
gTF/OGcx/oHlKSsVXQCfRRlevA3JbwyK9bpgVLIMET/BVHs=
=4ZzM
-----END PGP PUBLIC KEY BLOCK-----

--=_1wlgtqjbvnc0--


--------------090409020102020000080703
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-- 
sam mailing list - Join the hunt: http://horde.org/bounties/#sam
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]

--------------090409020102020000080703--