mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-05 17:32:25 +02:00
Resolved Issue ID 0000526:
o Add default group to new user git-svn-id: http://piwigo.org/svn/trunk@1581 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -93,6 +93,26 @@ SELECT MAX('.$conf['user_fields']['id'].') + 1
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
||||
mass_inserts(USERS_TABLE, array_keys($insert), array($insert));
|
||||
|
||||
// Assign by default one group
|
||||
if(isset($conf['id_group']))
|
||||
{
|
||||
$query = '
|
||||
select count(*) from '.GROUPS_TABLE.' where id = '.$conf['id_group'].';';
|
||||
list($exist_group) = mysql_fetch_array(pwg_query($query));
|
||||
|
||||
if ($exist_group == 1)
|
||||
{
|
||||
$insert =
|
||||
array(
|
||||
'user_id' => $next_id,
|
||||
'group_id' => $conf['id_group']
|
||||
);
|
||||
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
||||
mass_inserts(USER_GROUP_TABLE, array_keys($insert), array($insert));
|
||||
}
|
||||
}
|
||||
|
||||
create_user_infos($next_id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user