2 rcs_id('$Id: BogoLogin.php,v 1.3 2004-11-06 03:07:03 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 override it with the PersonalPagePassUser 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 $
61 // Revision 1.2 2004/11/05 20:53:36 rurban
62 // login cleanup: better debug msg on failing login,
63 // checked password less immediate login (bogo or anon),
64 // checked olduser pref session error,
65 // better PersonalPage without password warning on minimal password length=0
66 // (which is default now)
68 // Revision 1.1 2004/11/01 10:43:58 rurban
69 // seperate PassUser methods into seperate dir (memory usage)
70 // fix WikiUser (old) overlarge data session
71 // remove wikidb arg from various page class methods, use global ->_dbi instead
79 // c-hanging-comment-ender-p: nil
80 // indent-tabs-mode: nil