2 // $Id: EMailConfirm.php 8071 2011-05-18 14:56:14Z vargenau $
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='') {
38 if (!$this->_prefs and isa($this, "_EMailPassUser")) {
39 if ($prefs) $this->_prefs = $prefs;
40 if (!isset($this->_prefs->_method))
41 _PassUser::_PassUser($UserName);
43 $this->_userid = $UserName;
47 function userExists() {
48 if (!$this->isValidName($this->_userid)) {
49 return $this->_tryNextUser();
51 $this->_authmethod = 'EMailConfirm';
52 // check the prefs for emailVerified
53 if ($this->_prefs->get('emailVerified'))
55 return $this->_tryNextUser();
63 // c-hanging-comment-ender-p: nil
64 // indent-tabs-mode: nil