[sam] Re: SAM not using full email address
Yasser Nabi
yasser at unixuser.org.uk
Mon Dec 13 21:53:15 PST 2004
Thanks... That worked a treat :o)
On Mon, 2004-12-13 at 17:05 -0500, John Dalbec wrote:
> See attached message
> email message attachment (Re: [horde] Horde installation for users in
> multiple domains)
> On Mon, 2004-12-13 at 17:05 -0500, John Dalbec wrote:
> > 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 <jpdalbec at ysu.edu>:
> >
> > > diego at llosa.net wrote:
> > >
> > >> If I login as user at domain.tld and set $conf['hooks']['username'] =
> > >> false; then
> > >> it SAM uses just user.
> > >>
> > >> If I login as user at domain.tld 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 user at example.com 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 at 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 <jpdalbec at ysu.edu>:
> > >>
> > >>> diego at llosa.net wrote:
> > >>>
> > >>>> Has anybody been able to get the Sam hook to work so that the user is
> > >>>> user at 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 <thomas at creativebusinessystems.com>:
> > >>>>
> > >>>>> Quoting diego at llosa.net:
> > >>>>>
> > >>>>>> 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.
> >
More information about the sam
mailing list