[horde] Limit login to one domain

pillul at freenet.de pillul at freenet.de
Thu Jun 27 15:22:27 UTC 2013


Hey Michael,

i tried your line but i still can login...

I also tried something like this:

    if (preg_match("/^\w+ at domain\.de$/i", $user) == 1) {
            return true;
      }
      else {
              return false;
      }

But no luck :(

-----Ursprüngliche Nachricht-----
Von: horde-bounces at lists.horde.org [mailto:horde-bounces at lists.horde.org] Im
Auftrag von Michael M Slusarz
Gesendet: Donnerstag, 27. Juni 2013 16:56
An: horde at lists.horde.org
Betreff: Re: [horde] Limit login to one domain

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]

--
Horde mailing list
Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail:
horde-unsubscribe at lists.horde.org



More information about the horde mailing list