when the admin creates a new account, use the system language for this accounts
This commit is contained in:
parent
82dcc3fe79
commit
7aa4f5297d
1 changed files with 8 additions and 6 deletions
|
@ -1132,13 +1132,15 @@ function admin_page_users_post(&$a){
|
||||||
$nu_name = (x($_POST, 'new_user_name') ? $_POST['new_user_name'] : '');
|
$nu_name = (x($_POST, 'new_user_name') ? $_POST['new_user_name'] : '');
|
||||||
$nu_nickname = (x($_POST, 'new_user_nickname') ? $_POST['new_user_nickname'] : '');
|
$nu_nickname = (x($_POST, 'new_user_nickname') ? $_POST['new_user_nickname'] : '');
|
||||||
$nu_email = (x($_POST, 'new_user_email') ? $_POST['new_user_email'] : '');
|
$nu_email = (x($_POST, 'new_user_email') ? $_POST['new_user_email'] : '');
|
||||||
|
$nu_language = get_config('system', 'language');
|
||||||
|
|
||||||
check_form_security_token_redirectOnErr('/admin/users', 'admin_users');
|
check_form_security_token_redirectOnErr('/admin/users', 'admin_users');
|
||||||
|
|
||||||
if(!($nu_name==="") && !($nu_email==="") && !($nu_nickname==="")) {
|
if(!($nu_name==="") && !($nu_email==="") && !($nu_nickname==="")) {
|
||||||
require_once('include/user.php');
|
require_once('include/user.php');
|
||||||
|
|
||||||
$result = create_user(array('username'=>$nu_name, 'email'=>$nu_email, 'nickname'=>$nu_nickname, 'verified'=>1));
|
$result = create_user(array('username'=>$nu_name, 'email'=>$nu_email,
|
||||||
|
'nickname'=>$nu_nickname, 'verified'=>1, 'language'=>$nu_language));
|
||||||
if(! $result['success']) {
|
if(! $result['success']) {
|
||||||
notice($result['message']);
|
notice($result['message']);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue