1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 19:54:12 +02:00

- fixed a referencing problem with objects (PHP4/5 conflict)

- user_group_auth can take data from both target and source database


git-svn-id: file:///svn/phpbb/trunk@7002 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann
2007-02-17 14:14:56 +00:00
parent 0af3306ee4
commit b0d453098b
3 changed files with 24 additions and 10 deletions

View File

@@ -698,22 +698,22 @@ function phpbb_convert_authentication($mode)
if ($mode == 'start')
{
user_group_auth('guests', 'SELECT user_id, {GUESTS} FROM ' . USERS_TABLE . ' WHERE user_id = ' . ANONYMOUS);
user_group_auth('registered', 'SELECT user_id, {REGISTERED} FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS);
user_group_auth('guests', 'SELECT user_id, {GUESTS} FROM ' . USERS_TABLE . ' WHERE user_id = ' . ANONYMOUS, false);
user_group_auth('registered', 'SELECT user_id, {REGISTERED} FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS, false);
// Selecting from old table
$auth_sql = 'SELECT ';
$auth_sql .= (!empty($config['increment_user_id'])) ? 'user_id + 1 as user_id' : 'user_id';
$auth_sql .= ', {ADMINISTRATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1';
user_group_auth('administrators', $auth_sql);
user_group_auth('administrators', $auth_sql, true);
// Put administrators into global moderators group too...
$auth_sql = 'SELECT ';
$auth_sql .= (!empty($config['increment_user_id'])) ? 'user_id + 1 as user_id' : 'user_id';
$auth_sql .= ', {GLOBAL_MODERATORS} FROM ' . $convert->src_table_prefix . 'users WHERE user_level = 1';
user_group_auth('global_moderators', $auth_sql);
user_group_auth('global_moderators', $auth_sql, true);
}
else if ($mode == 'first')
{