[sam] SAM not using full email address

Yasser Nabi yasser at unixuser.org.uk
Mon Dec 13 09:47:01 PST 2004


Hi, i tried horde hook:

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;
         }
     }
 }

But from what i can tell (iam not a php peep), it looks like that will
just strip away everything and just give the $local_part (i.e everything
before the @)...

$parts = explode('@', $horde_uid);
             return $parts[0];

I tried it anyway, and same problem

So... i tried commenting out all that section and just leaving it return
$horde_uid (which didnt make much sense to me as that is what is given
to the function.. but tried it anyway). Same problem. I would appreciate
the correct syntax for the _sam_hook_username function.

Thanks for your help



On Mon, 2004-12-13 at 11:44 -0500, Chuck Hagenbuch wrote:
> Quoting Yasser Nabi <yasser at unixuser.org.uk>:
> 
> > I have installed SAM from CVS (HEAD), its working fine.. except for one
> > problem. When it queries the DB, it only uses the first part of the
> > username (iam using email address as the username for all modules in
> > Horde)... This is causing a bit of a problem, as i managed multiple
> > domains. I would like SAM to query on the full email address... All
> > other modules in Horde seem to be ok and do this.
> >
> > How can this be done with SAM?
> 
> Look at the username hook.
> 
> -chuck
> 
> -- 
> "But she goes not abroad in search of monsters to destroy." - John 
> Quincy Adams



More information about the sam mailing list