4 * Copyright (C) 2007,2009 Reini Urban
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.
22 include_once 'lib/WikiUser/LDAP.php';
25 * Overrides for LDAP (Windows domain) usernames:
26 * Search lowercase, but convert it then to uppercase to match the WINDOWS name.
27 * Define the vars LDAP_AUTH_HOST, LDAP_BASE_DN, LDAP_SEARCH_FILTER in config/config.ini
28 * Preferences are handled in _PassUser
30 class _LdapUpperPassUser
34 function checkPass($submitted_password)
36 return parent::checkPass($submitted_password);
41 if (!empty($this->_userid)) {
42 $this->_userid = trim(strtoupper($this->_userid));
43 if (!empty($this->_HomePagehandle) and is_object($this->_HomePagehandle))
44 $this->_HomePagehandle->_pagename = $this->_userid;
45 return strtoupper($this->_userid);
52 // lowercase check and uppercase visibility
53 $this->_userid = trim(strtoupper($this->_userid));
54 return parent::userExists();
62 // c-hanging-comment-ender-p: nil
63 // indent-tabs-mode: nil