This commit is contained in:
gyhanggd 2024-04-12 09:25:13 +08:00
parent 0bea212c5f
commit 39fc0e5a73
1 changed files with 2 additions and 6 deletions

View File

@ -634,20 +634,16 @@ class User_model extends CI_Model
return $this->rs; return $this->rs;
} }
$rowUser = $this->tb_user->get_one(array('id' => $userId)); $rowUser = $this->tb_user->get_one(array('id' => $userId));
$username = $info['username_u'];
$companyRow = $this->tb_company->get_one(array('id' => $this->session->companyId)); $companyRow = $this->tb_company->get_one(array('id' => $this->session->companyId));
$arr = array( $arr = array(
'type_id' => $info['typeId'], 'type_id' => $info['typeId'],
'username' => $username,
'cellphone' => $info['cellphone'], 'cellphone' => $info['cellphone'],
'cellphone2' => $info['cellphone2'], 'cellphone2' => $info['cellphone2'],
'area_id' => $info['area_id'], 'area_id' => $info['area_id'],
'dining_hall_id' => $info['dining_hall_id'], 'dining_hall_id' => $info['dining_hall_id'],
); );
if ($info['username_u']){
if (strpos($info['username_u'], 'genc_') === 0){
$username = $info['username_u'];
}else $username = dbenc($info['username_u']);
$arr['username'] = $username;
}
if ($companyRow['is_use_department']){ if ($companyRow['is_use_department']){
$arr['department_id'] = isset($info['department_id']) && !empty($info['department_id']) ? $info['department_id'] : null; $arr['department_id'] = isset($info['department_id']) && !empty($info['department_id']) ? $info['department_id'] : null;
if (isset($info['deptnameId'])){ if (isset($info['deptnameId'])){