mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
*** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@8142 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
305bea7b9e
commit
56b6195563
4 changed files with 52 additions and 20 deletions
|
@ -6,11 +6,19 @@
|
||||||
*
|
*
|
||||||
* @package login
|
* @package login
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
* @copyright (c) 2005 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
|
if (!defined('IN_PHPBB'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the user is identified to apache
|
* Checks whether the user is identified to apache
|
||||||
* Only allow changing authentication to apache if the user is identified
|
* Only allow changing authentication to apache if the user is identified
|
||||||
|
@ -68,7 +76,7 @@ function login_apache(&$username, &$password)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type
|
$sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type
|
||||||
FROM ' . USERS_TABLE . "
|
FROM ' . USERS_TABLE . "
|
||||||
WHERE username = '" . $db->sql_escape($php_auth_user) . "'";
|
WHERE username = '" . $db->sql_escape($php_auth_user) . "'";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
|
@ -8,11 +8,19 @@
|
||||||
*
|
*
|
||||||
* @package login
|
* @package login
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
* @copyright (c) 2005 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
|
if (!defined('IN_PHPBB'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Login function
|
* Login function
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* LDAP auth plug-in for phpBB3
|
* LDAP auth plug-in for phpBB3
|
||||||
*
|
*
|
||||||
|
@ -7,11 +7,19 @@
|
||||||
*
|
*
|
||||||
* @package login
|
* @package login
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
* @copyright (c) 2005 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
|
if (!defined('IN_PHPBB'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to ldap server
|
* Connect to ldap server
|
||||||
* Only allow changing authentication to ldap if we can connect to the ldap server
|
* Only allow changing authentication to ldap if we can connect to the ldap server
|
||||||
|
|
|
@ -1,13 +1,21 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @package phpBB3
|
* @package phpBB3
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
* @copyright (c) 2005 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
|
if (!defined('IN_PHPBB'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom Profile Fields
|
* Custom Profile Fields
|
||||||
* @package phpBB3
|
* @package phpBB3
|
||||||
|
@ -49,11 +57,11 @@ class custom_profile
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT l.*, f.*
|
$sql = 'SELECT l.*, f.*
|
||||||
FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . " f
|
FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . " f
|
||||||
WHERE f.field_active = 1
|
WHERE f.field_active = 1
|
||||||
$sql_where
|
$sql_where
|
||||||
AND l.lang_id = $lang_id
|
AND l.lang_id = $lang_id
|
||||||
AND l.field_id = f.field_id
|
AND l.field_id = f.field_id
|
||||||
ORDER BY f.field_order";
|
ORDER BY f.field_order";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
@ -141,7 +149,7 @@ class custom_profile
|
||||||
{
|
{
|
||||||
return 'FIELD_TOO_SMALL';
|
return 'FIELD_TOO_SMALL';
|
||||||
}
|
}
|
||||||
else if ($field_value > $field_data['field_maxlen'])
|
else if ($field_value > $field_data['field_maxlen'])
|
||||||
{
|
{
|
||||||
return 'FIELD_TOO_LARGE';
|
return 'FIELD_TOO_LARGE';
|
||||||
}
|
}
|
||||||
|
@ -200,12 +208,12 @@ class custom_profile
|
||||||
|
|
||||||
// Display hidden/no_view fields for admin/moderator
|
// Display hidden/no_view fields for admin/moderator
|
||||||
$sql = 'SELECT l.*, f.*
|
$sql = 'SELECT l.*, f.*
|
||||||
FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f
|
FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f
|
||||||
WHERE l.lang_id = ' . $user->get_iso_lang_id() . '
|
WHERE l.lang_id = ' . $user->get_iso_lang_id() . '
|
||||||
AND f.field_active = 1 ' .
|
AND f.field_active = 1 ' .
|
||||||
((!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) ? ' AND f.field_hide = 0 ' : '') . '
|
((!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) ? ' AND f.field_hide = 0 ' : '') . '
|
||||||
AND f.field_no_view = 0
|
AND f.field_no_view = 0
|
||||||
AND l.field_id = f.field_id
|
AND l.field_id = f.field_id
|
||||||
ORDER BY f.field_order';
|
ORDER BY f.field_order';
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
@ -280,11 +288,11 @@ class custom_profile
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT l.*, f.*
|
$sql = 'SELECT l.*, f.*
|
||||||
FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . " f
|
FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . " f
|
||||||
WHERE l.lang_id = $lang_id
|
WHERE l.lang_id = $lang_id
|
||||||
AND f.field_active = 1
|
AND f.field_active = 1
|
||||||
$sql_where
|
$sql_where
|
||||||
AND l.field_id = f.field_id
|
AND l.field_id = f.field_id
|
||||||
ORDER BY f.field_order";
|
ORDER BY f.field_order";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
@ -800,8 +808,8 @@ class custom_profile
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT f.field_type, f.field_ident, f.field_default_value, l.lang_default_value
|
$sql = 'SELECT f.field_type, f.field_ident, f.field_default_value, l.lang_default_value
|
||||||
FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f
|
FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f
|
||||||
WHERE l.lang_id = ' . $user->get_iso_lang_id() . '
|
WHERE l.lang_id = ' . $user->get_iso_lang_id() . '
|
||||||
' . ((sizeof($sql_not_in)) ? ' AND ' . $db->sql_in_set('f.field_ident', $sql_not_in, true) : '') . '
|
' . ((sizeof($sql_not_in)) ? ' AND ' . $db->sql_in_set('f.field_ident', $sql_not_in, true) : '') . '
|
||||||
AND l.field_id = f.field_id';
|
AND l.field_id = f.field_id';
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
Loading…
Add table
Reference in a new issue