3 /* Copyright (C) 2004 ReiniUrban
4 * This file is part of PhpWiki. Terms and Conditions see LICENSE. (GPL2)
7 /** Without stored password. A _BogoLoginPassUser with password
8 * is automatically upgraded to a PersonalPagePassUser.
10 class _BogoLoginPassUser extends _PassUser {
12 var $_authmethod = 'BogoLogin';
14 function userExists() {
15 if (isWikiWord($this->_userid)) {
16 $this->_level = WIKIAUTH_BOGO;
19 $this->_level = WIKIAUTH_ANON;
24 /** A BogoLoginUser requires no password at all
25 * But if there's one stored, we override it with the PersonalPagePassUser instead
27 function checkPass($submitted_password) {
28 if ($this->_prefs->get('passwd')) {
29 if (isset($this->_prefs->_method) and $this->_prefs->_method == 'HomePage') {
30 $user = new _PersonalPagePassUser($this->_userid, $this->_prefs);
31 if ($user->checkPass($submitted_password)) {
32 if (!check_php_version(5))
33 eval("\$this = \$user;");
34 // /*PHP5 patch*/$this = $user;
35 $user = UpgradeUser($this, $user);
36 $this->_level = WIKIAUTH_USER;
39 $this->_level = WIKIAUTH_ANON;
43 $stored_password = $this->_prefs->get('passwd');
44 if ($this->_checkPass($submitted_password, $stored_password)) {
45 $this->_level = WIKIAUTH_USER;
47 } elseif (USER_AUTH_POLICY === 'strict') {
48 $this->_level = WIKIAUTH_FORBIDDEN;
51 return $this->_tryNextPass($submitted_password);
55 if (isWikiWord($this->_userid)) {
56 $this->_level = WIKIAUTH_BOGO;
58 $this->_level = WIKIAUTH_ANON;
64 // $Log: not supported by cvs2svn $
65 // Revision 1.5 2005/02/14 12:28:27 rurban
66 // fix policy strict. Thanks to Mikhail Vladimirov
68 // Revision 1.4 2004/12/26 17:11:15 rurban
71 // Revision 1.3 2004/11/06 03:07:03 rurban
72 // make use of dumped static config state in config/config.php (if writable)
74 // Revision 1.2 2004/11/05 20:53:36 rurban
75 // login cleanup: better debug msg on failing login,
76 // checked password less immediate login (bogo or anon),
77 // checked olduser pref session error,
78 // better PersonalPage without password warning on minimal password length=0
79 // (which is default now)
81 // Revision 1.1 2004/11/01 10:43:58 rurban
82 // seperate PassUser methods into seperate dir (memory usage)
83 // fix WikiUser (old) overlarge data session
84 // remove wikidb arg from various page class methods, use global ->_dbi instead
92 // c-hanging-comment-ender-p: nil
93 // indent-tabs-mode: nil