2 rcs_id('$Id: BogoLogin.php,v 1.1 2004-11-01 10:43:58 rurban Exp $');
3 /* Copyright (C) 2004 $ThePhpWikiProgrammingTeam
6 /** Without stored password. A _BogoLoginPassUser with password
7 * is automatically upgraded to a PersonalPagePassUser.
9 class _BogoLoginPassUser
12 var $_authmethod = 'BogoLogin';
13 function userExists() {
14 if (isWikiWord($this->_userid)) {
15 $this->_level = WIKIAUTH_BOGO;
18 $this->_level = WIKIAUTH_ANON;
23 /** A BogoLoginUser requires no password at all
24 * But if there's one stored, we should prefer PersonalPage instead
26 function checkPass($submitted_password) {
27 if ($this->_prefs->get('passwd')) {
28 if (isset($this->_prefs->_method) and $this->_prefs->_method == 'HomePage') {
29 $user = new _PersonalPagePassUser($this->_userid, $this->_prefs);
30 if ($user->checkPass($submitted_password)) {
31 if (!check_php_version(5))
32 eval("\$this = \$user;");
33 // /*PHP5 patch*/$this = $user;
34 $user = UpgradeUser($this, $user);
35 $this->_level = WIKIAUTH_USER;
38 $this->_level = WIKIAUTH_ANON;
42 $stored_password = $this->_prefs->get('passwd');
43 if ($this->_checkPass($submitted_password, $stored_password)) {
44 $this->_level = WIKIAUTH_USER;
47 return $this->_tryNextPass($submitted_password);
51 if (isWikiWord($this->_userid)) {
52 $this->_level = WIKIAUTH_BOGO;
54 $this->_level = WIKIAUTH_ANON;
60 // $Log: not supported by cvs2svn $
66 // c-hanging-comment-ender-p: nil
67 // indent-tabs-mode: nil