用户姓名加密问题

This commit is contained in:
fengjh5 2024-04-12 09:17:40 +08:00
parent 9f7b4d4916
commit a82654cc5c
1 changed files with 6 additions and 2 deletions

View File

@ -634,16 +634,20 @@ 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'])){