[horde] Limit login to one domain
pillul
pillul at freenet.de
Wed Jul 3 12:37:22 UTC 2013
So i finaly fixed it.
The Problem is i use IMAP as authentication driver and (i guess) this is
why $userID is empty.
If $userID is empty you cant compare it with a preg_match....
So i came up with this and it works:
if(preg_match('/^.{1,}@domain\.de$/i', $_POST['horde_user']) == 0)
{
return(false);
}
else
{
return(true);
}
Am 27.06.2013, 16:56 Uhr, schrieb Michael M Slusarz <slusarz at horde.org>:
> Quoting pillul <pillul at freenet.de>:
>
>> Hey,
>> Thanks for your reply. I changed the preg_match but it doesn't work...
>>
>> return preg_match("/\w+ at domainaaa.de/i",$userId);
>
> This returns an integer. The hook documentation requires boolean false
> to be returned if you want to fail the login. i.e.:
>
> return preg_match("/^\w+ at domainaaa\.de$/i",$userId);
>
> michael
>
>
> ___________________________________
> Michael Slusarz [slusarz at horde.org]
More information about the horde
mailing list