If administrator connects without having a profile, he gets the default one
This commit is contained in:
parent
9d487d5976
commit
b7f59027d9
1 changed files with 11 additions and 2 deletions
|
|
@ -915,8 +915,17 @@ function find_default_module()
|
|||
*/
|
||||
if (empty ($default_module))
|
||||
{
|
||||
echo_warning(_("Utilisateur n'a pas de profil, votre administrateur doit en configurer un dans CFGSEC"));
|
||||
exit();
|
||||
/*
|
||||
* If administrateur, then we insert a default profile (1)
|
||||
* for him
|
||||
*/
|
||||
if ( $g_user->admin == 1 )
|
||||
{
|
||||
$cn->exec_sql('insert into profile_user(user_name,p_id) values ($1,1) ',array($g_user->login));
|
||||
return find_default_module();
|
||||
}
|
||||
echo_warning(_("Utilisateur n'a pas de profil, votre administrateur doit en configurer un dans CFGSEC"));
|
||||
exit();
|
||||
}
|
||||
}
|
||||
return $default_module[0]['me_code'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue