Auth and passing loginFunction
| From: | Birgir Stefansson | Date: | Fri, 08 Aug 2003 13:57:47 +0000 |
| Subject: | Auth and passing loginFunction | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-7109@lists.php.net to get a copy of this message | ||
Hi.
I'm using Auth and am trying to pass a method as a loginfunction to the
Auth constructor.
I run into trouble because loginfunction is expected to be a function
and not a method as you can see on these lines in the constructor.
if ($loginFunction != "" && function_exists($loginFunction)) {
$this->loginFunction = $loginFunction;
}
Changing these first lines of the constructor to
if ((is_array($loginFunction) &&
method_exists($loginFunction[0],$loginFunction[1])) || ($loginFunction
!= "" && function_exists($
loginFunction))) {
$this->loginFunction = $loginFunction;
}
would allow me to pass a method.
Would it be possible to add this functionality ?
TIA.
Birgir Stefansson