Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
a0d36587
Commit
a0d36587
authored
May 30, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
经纪人修改密码
parent
f264353b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
BrokerService.php
application/index/service/BrokerService.php
+4
-2
AAgents.php
application/model/AAgents.php
+8
-3
No files found.
application/index/service/BrokerService.php
View file @
a0d36587
...
@@ -512,13 +512,15 @@ class BrokerService
...
@@ -512,13 +512,15 @@ class BrokerService
return
[
'status'
=>
101
,
'msg'
=>
'请输入新密码长度为6~18'
];
return
[
'status'
=>
101
,
'msg'
=>
'请输入新密码长度为6~18'
];
$agent_password
=
$this
->
m_agent
->
getAgentFieldById
(
$agent_id
,
'password'
);
$agent_password
=
$this
->
m_agent
->
getAgentFieldById
(
$agent_id
,
'password'
);
if
(
!
$agent_password
)
return
array
(
'status'
=>
101
,
'msg'
=>
'不存在该经纪人'
,
'result'
=>
''
);
//验证原密码
//验证原密码
if
(
$agent_password
&&
(
md5
(
$old_password
)
!=
$agent_password
))
if
(
$agent_password
&&
(
md5
(
$old_password
)
!=
$agent_password
))
return
array
(
'status'
=>
101
,
'msg'
=>
'原密不正确'
,
'result'
=>
''
);
return
array
(
'status'
=>
101
,
'msg'
=>
'原密不正确'
,
'result'
=>
''
);
$result
=
$this
->
m_agent
->
modifyAgentPassword
(
$agent_id
,
md5
(
$old_password
)
);
$result
=
$this
->
m_agent
->
modifyAgentPassword
(
$agent_id
,
$new_password
);
if
(
!
$result
)
if
(
$result
!=
1
)
return
array
(
'status'
=>
101
,
'msg'
=>
'修改失败'
,
'result'
=>
''
);
return
array
(
'status'
=>
101
,
'msg'
=>
'修改失败'
,
'result'
=>
''
);
return
array
(
'status'
=>
101
,
'msg'
=>
'修改成功'
,
'result'
=>
''
);
return
array
(
'status'
=>
101
,
'msg'
=>
'修改成功'
,
'result'
=>
''
);
}
}
...
...
application/model/AAgents.php
View file @
a0d36587
...
@@ -1676,10 +1676,15 @@ class AAgents extends BaseModel
...
@@ -1676,10 +1676,15 @@ class AAgents extends BaseModel
}
}
/**
public
function
modifyAgentPassword
(
$id
,
$pwd
)
* 经纪人修改密码
* @param $id
* @param $password
* @return false|int
*/
public
function
modifyAgentPassword
(
$id
,
$password
)
{
{
$result
=
$this
->
save
([
'password'
=>
md5
(
$p
w
d
)
],
[
'id'
=>
$id
]);
$result
=
$this
->
save
([
'password'
=>
md5
(
$p
asswor
d
)
],
[
'id'
=>
$id
]);
return
$result
;
return
$result
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment