when the admin creates a new account, use the system language for this accounts
This commit is contained in:
parent
82dcc3fe79
commit
7aa4f5297d
|
@ -1127,18 +1127,20 @@ function admin_page_dbsync(&$a) {
|
|||
* @param App $a
|
||||
*/
|
||||
function admin_page_users_post(&$a){
|
||||
$pending = (x($_POST, 'pending') ? $_POST['pending'] : array());
|
||||
$users = (x($_POST, 'user') ? $_POST['user'] : array());
|
||||
$nu_name = (x($_POST, 'new_user_name') ? $_POST['new_user_name'] : '');
|
||||
$nu_nickname = (x($_POST, 'new_user_nickname') ? $_POST['new_user_nickname'] : '');
|
||||
$nu_email = (x($_POST, 'new_user_email') ? $_POST['new_user_email'] : '');
|
||||
$pending = (x($_POST, 'pending') ? $_POST['pending'] : array());
|
||||
$users = (x($_POST, 'user') ? $_POST['user'] : array());
|
||||
$nu_name = (x($_POST, 'new_user_name') ? $_POST['new_user_name'] : '');
|
||||
$nu_nickname = (x($_POST, 'new_user_nickname') ? $_POST['new_user_nickname'] : '');
|
||||
$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');
|
||||
|
||||
if(!($nu_name==="") && !($nu_email==="") && !($nu_nickname==="")) {
|
||||
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']) {
|
||||
notice($result['message']);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue