diff --git a/backstage/application/backstage/models/User_model.php b/backstage/application/backstage/models/User_model.php index 13117be..9b73778 100644 --- a/backstage/application/backstage/models/User_model.php +++ b/backstage/application/backstage/models/User_model.php @@ -634,16 +634,20 @@ class User_model extends CI_Model return $this->rs; } $rowUser = $this->tb_user->get_one(array('id' => $userId)); - $username = $info['username_u']; $companyRow = $this->tb_company->get_one(array('id' => $this->session->companyId)); $arr = array( 'type_id' => $info['typeId'], - 'username' => $username, 'cellphone' => $info['cellphone'], 'cellphone2' => $info['cellphone2'], 'area_id' => $info['area_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']){ $arr['department_id'] = isset($info['department_id']) && !empty($info['department_id']) ? $info['department_id'] : null; if (isset($info['deptnameId'])){