2 rcs_id('$Id: PersonalPage.php,v 1.1 2004-11-01 10:43:58 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 trigger_error(sprintf(
28 _("PersonalPage login method:\n").
29 _("You stored an empty password in your '%s' page.\n").
30 _("Your access permissions are only for a BogoUser.\n").
31 _("Please set your password in UserPreferences."),
32 $this->_userid), E_USER_WARNING);
33 $this->_level = WIKIAUTH_BOGO;
36 if ($this->_checkPass($submitted_password, $stored_password))
37 return ($this->_level = WIKIAUTH_USER);
38 return _PassUser::checkPass($submitted_password);
44 // $Log: not supported by cvs2svn $
50 // c-hanging-comment-ender-p: nil
51 // indent-tabs-mode: nil