Bläddra i källkod

when the admin creates a new account, use the system language for this accounts

tags/3.5.1
Tobias Diekershoff 4 år sedan
förälder
incheckning
7aa4f5297d
1 ändrade filer med 8 tillägg och 6 borttagningar
  1. +8
    -6
      mod/admin.php

+ 8
- 6
mod/admin.php Visa fil

@@ -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;


Laddar…
Avbryt
Spara