2 rcs_id('$Id: PersonalPage.php,v 1.2 2004-11-05 20:53:36 rurban Exp $');
3 /* Copyright (C) 2004 $ThePhpWikiProgrammingTeam
7 * This class is only to simplify the auth method dispatcher.
8 * It inherits almost all all methods from _PassUser.
10 class _PersonalPagePassUser
13 var $_authmethod = 'PersonalPage';
15 function userExists() {
16 return $this->_HomePagehandle and $this->_HomePagehandle->exists();
19 /** A PersonalPagePassUser requires PASSWORD_LENGTH_MINIMUM.
20 * BUT if the user already has a homepage with an empty password
21 * stored, allow login but warn him to change it.
23 function checkPass($submitted_password) {
24 if ($this->userExists()) {
25 $stored_password = $this->_prefs->get('passwd');
26 if (empty($stored_password)) {
27 if (PASSWORD_LENGTH_MINIMUM > 0) {
28 trigger_error(sprintf(
29 _("PersonalPage login method:\n").
30 _("You stored an empty password in your '%s' page.\n").
31 _("Your access permissions are only for a BogoUser.\n").
32 _("Please set a password in UserPreferences."),
33 $this->_userid), E_USER_WARNING);
34 $this->_level = WIKIAUTH_BOGO;
36 trigger_error(sprintf(
37 _("PersonalPage login method:\n").
38 _("You stored an empty password in your '%s' page.\n").
39 _("Given password ignored.\n").
40 _("Please set a password in UserPreferences."),
41 $this->_userid), E_USER_WARNING);
42 $this->_level = WIKIAUTH_USER;
46 if ($this->_checkPass($submitted_password, $stored_password))
47 return ($this->_level = WIKIAUTH_USER);
48 return _PassUser::checkPass($submitted_password);
54 // $Log: not supported by cvs2svn $
55 // Revision 1.1 2004/11/01 10:43:58 rurban
56 // seperate PassUser methods into seperate dir (memory usage)
57 // fix WikiUser (old) overlarge data session
58 // remove wikidb arg from various page class methods, use global ->_dbi instead
66 // c-hanging-comment-ender-p: nil
67 // indent-tabs-mode: nil