mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-28 04:09:56 +03: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:
parent
2b3bc579e4
commit
2433a7cb54
2 changed files with 23 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue