cvs: pear /Auth Auth.php

From: Date: Tue, 16 Mar 2004 07:49:08 +0000
Subject: cvs: pear /Auth Auth.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-17445@lists.php.net to get a copy of this message
yavo Tue Mar 16 02:49:08 2004 EDT Modified files: /pear/Auth Auth.php Log: Fixed callbacks to pass auth fer instead of auth copy http://cvs.php.net/diff.php/pear/Auth/Auth.php?r1=1.73&r2=1.74&ty=u Index: pear/Auth/Auth.php diff -u pear/Auth/Auth.php:1.73 pear/Auth/Auth.php:1.74 --- pear/Auth/Auth.php:1.73 Wed Mar 3 18:15:06 2004 +++ pear/Auth/Auth.php Tue Mar 16 02:49:08 2004 @@ -16,7 +16,7 @@ // | Authors: Martin Jansen <mj@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Auth.php,v 1.73 2004/03/03 23:15:06 yavo Exp $ +// $Id: Auth.php,v 1.74 2004/03/16 07:49:08 yavo Exp $ // require_once 'PEAR.php'; @@ -34,7 +34,7 @@ * * @author Martin Jansen <mj@php.net> * @package Auth - * @version $Revision: 1.73 $ + * @version $Revision: 1.74 $ */ class Auth { @@ -330,7 +330,7 @@ if (!empty($this->username) && $login_ok) { $this->setAuth($this->username); if (is_callable($this->loginCallback)) { - call_user_func($this->loginCallback,$this->username, $this); + call_user_func($this->loginCallback,$this->username, &$this); } } @@ -341,7 +341,7 @@ if (!empty($this->username) && !$login_ok) { $this->status = AUTH_WRONG_LOGIN; if (is_callable($this->loginFailedCallback)) { - call_user_func($this->loginFailedCallback,$this->username, $this); + call_user_func($this->loginFailedCallback,$this->username, &$this); } } @@ -538,6 +538,7 @@ function setAuth($username) { $session = &Auth::_importGlobalVariable('session'); + $server = &$this->_importGlobalVariable('server'); if (!isset($session[$this->_sessionName]) && !isset($_SESSION)) { session_register($this->_sessionName); @@ -678,7 +679,7 @@ function drawLogin($username = '') { if (is_callable($this->loginFunction)) { - call_user_func($this->loginFunction, $username, $this->status, $this); + call_user_func($this->loginFunction, $username, $this->status, &$this); } else { $server = &$this->_importGlobalVariable('server'); @@ -735,7 +736,7 @@ $session = &$this->_importGlobalVariable('session'); if (is_callable($this->logoutCallback)) { - call_user_func($this->logoutCallback, $session[$this->_sessionName]['username'], $this); + call_user_func($this->logoutCallback, $session[$this->_sessionName]['username'], &$this); } $this->username = '';

« previous php.pear.cvs (#17445) next »