]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/WikiUser/OpenID.php
svn propset svn:keywords Id
[SourceForge/phpwiki.git] / lib / WikiUser / OpenID.php
1 <?php //-*-php-*-
2 rcs_id('$Id$');
3 /* Copyright (C) 2007 ReiniUrban
4  * This file is part of PhpWiki. Terms and Conditions see LICENSE. (GPL2)
5  *
6  * See http://openid.net/specs/openid-authentication-1_1.html
7  */
8
9 class _OpenIDPassUser
10 extends _PassUser
11 /**
12  * Preferences are handled in _PassUser
13  */
14 {
15     // This can only be called from _PassUser, because the parent class 
16     // sets the pref methods, before this class is initialized.
17     function _OpenIDPassUser($UserName='', $prefs=false, $file='') {
18         if (!$this->_prefs and isa($this, "_OpenIDPassUser")) {
19             if ($prefs) $this->_prefs = $prefs;
20             if (!isset($this->_prefs->_method))
21               _PassUser::_PassUser($UserName);
22         }
23         $this->_userid = $UserName;
24         return $this;
25     }
26
27     function userExists() {
28         if (!$this->isValidName($this->_userid)) {
29             return $this->_tryNextUser();
30         }
31         $this->_authmethod = 'OpenID';
32         // check the prefs for emailVerified
33         if ($this->_prefs->get('emailVerified'))
34             return true;
35         return $this->_tryNextUser();
36     }
37 }
38
39 // $Log: OpenID.php,v $
40
41 // Local Variables:
42 // mode: php
43 // tab-width: 8
44 // c-basic-offset: 4
45 // c-hanging-comment-ender-p: nil
46 // indent-tabs-mode: nil
47 // End:
48 ?>