4 * Copyright (C) 2006 ReiniUrban
6 * This file is part of PhpWiki.
8 * PhpWiki is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * PhpWiki is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with PhpWiki; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 class _EMailConfirmPassUser
26 * Unconfirmed users have ANON access,
27 * confirmed users are equal to passusers WIKIAUTH_USER.
29 * Users give their email at registration, phpwiki sends a link per email,
30 * user clicks on url link to verify, user is confirmed.
32 * Preferences are handled in _PassUser
35 // This can only be called from _PassUser, because the parent class
36 // sets the pref methods, before this class is initialized.
37 function _EMailConfirmPassUser($UserName = '', $prefs = false, $file = '')
39 if (!$this->_prefs and isa($this, "_EMailPassUser")) {
40 if ($prefs) $this->_prefs = $prefs;
41 if (!isset($this->_prefs->_method))
42 _PassUser::_PassUser($UserName);
44 $this->_userid = $UserName;
50 if (!$this->isValidName($this->_userid)) {
51 return $this->_tryNextUser();
53 $this->_authmethod = 'EMailConfirm';
54 // check the prefs for emailVerified
55 if ($this->_prefs->get('emailVerified'))
57 return $this->_tryNextUser();
65 // c-hanging-comment-ender-p: nil
66 // indent-tabs-mode: nil