_prefs = $prefs; if (!defined("AUTH_SESS_USER") or !defined("AUTH_SESS_LEVEL")) { trigger_error( "AUTH_SESS_USER or AUTH_SESS_LEVEL is not defined for the SessionPassUser method", E_USER_ERROR); exit; } $sess =& $GLOBALS['HTTP_SESSION_VARS']; // user hash: "[user][userid]" or object "user->id" if (strstr(AUTH_SESS_USER,"][")) { $sess = $GLOBALS['HTTP_SESSION_VARS']; // recurse into hashes: "[user][userid]", sess = sess[user] => sess = sess[userid] foreach (split("][",AUTH_SESS_USER) as $v) { $v = str_replace(array("[","]"),'',$v); $sess = $sess[$v]; } $this->_userid = $sess; } elseif (strstr(AUTH_SESS_USER,"->")) { // object "user->id" (no objects inside hashes supported!) list($obj,$key) = split("->",AUTH_SESS_USER); $this->_userid = $sess[$obj]->$key; } else { $this->_userid = $sess[AUTH_SESS_USER]; } if (!isset($this->_prefs->_method)) _PassUser::_PassUser($this->_userid); $this->_level = AUTH_SESS_LEVEL; $this->_authmethod = 'Session'; } function userExists() { return !empty($this->_userid); } function checkPass($submitted_password) { return $this->userExists() and $this->_level > -1; } function mayChangePass() { return false; } } // $Log: not supported by cvs2svn $ // Revision 1.2 2004/12/19 00:58:02 rurban // Enforce PASSWORD_LENGTH_MINIMUM in almost all PassUser checks, // Provide an errormessage if so. Just PersonalPage and BogoLogin not. // Simplify httpauth logout handling and set sessions for all methods. // fix main.php unknown index "x" getLevelDescription() warning. // // Revision 1.1 2004/11/01 10:43:58 rurban // seperate PassUser methods into seperate dir (memory usage) // fix WikiUser (old) overlarge data session // remove wikidb arg from various page class methods, use global ->_dbi instead // ... // // Local Variables: // mode: php // tab-width: 8 // c-basic-offset: 4 // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: ?>