Commit 18fdf6ef authored by hujun's avatar hujun

密码同步

parent 9198cd88
...@@ -118,12 +118,18 @@ class BrokerService ...@@ -118,12 +118,18 @@ class BrokerService
if ($is_new_id) { if ($is_new_id) {
$change_old_id = $agent_old[0]['id']; $change_old_id = $agent_old[0]['id'];
if (!empty($agent_old[0]['password'])) {
$data['password_md5'] = $agent_old[0]['password'];
}
$id = $this->m_agent->saveAgent($data); $id = $this->m_agent->saveAgent($data);
} elseif ($agent_data['status'] == 3) { } elseif ($agent_data['status'] == 3) {
$change_old_id = $agent_old[0]['id']; $change_old_id = $agent_old[0]['id'];
$id = $this->m_agent->saveAgent(['id'=>$agent_data['id'],'status'=>0]); $id = $this->m_agent->saveAgent(['id'=>$agent_data['id'],'status'=>0]);
$this->m_agent->saveAgent(['id'=>$agent_old[0]['id'],'status'=>3]); $this->m_agent->saveAgent(['id'=>$agent_old[0]['id'],'status'=>3]);
} else { } else {
if (!empty($agent_old[0]['password'])) {
$data['password_md5'] = $agent_old[0]['password'];
}
$change_old_id = $agent_old[0]['id']; $change_old_id = $agent_old[0]['id'];
//将原来的id作为新的 //将原来的id作为新的
$data['id'] = $agent_old[0]['id']; $data['id'] = $agent_old[0]['id'];
......
...@@ -1344,7 +1344,7 @@ class AAgents extends BaseModel ...@@ -1344,7 +1344,7 @@ class AAgents extends BaseModel
//密码 //密码
if (!empty($params['password_md5'])) { if (!empty($params['password_md5'])) {
$save_data['password'] = $params['password']; //默认号码后6位 $save_data['password'] = $params['password']; //不需要加密
} }
//性别 0保密 1男 2女 //性别 0保密 1男 2女
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment