Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
openApi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hj
openApi
Commits
11f9979f
Commit
11f9979f
authored
Apr 05, 2022
by
hangjun83
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
兼容
parent
a828185d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
server/app/Providers/Auth/AdminUsersProvider.php
server/app/Providers/Auth/AdminUsersProvider.php
+4
-4
No files found.
server/app/Providers/Auth/AdminUsersProvider.php
View file @
11f9979f
...
...
@@ -50,7 +50,7 @@ class AdminUsersProvider implements UserProvider
->
first
();
if
(
$user
->
status
===
0
){
return
throw
new
AuthenticationException
(
'用户已被禁用,请联系管理员.'
);
throw
new
AuthenticationException
(
'用户已被禁用,请联系管理员.'
);
}
return
$user
;
...
...
@@ -71,7 +71,7 @@ class AdminUsersProvider implements UserProvider
public
function
retrieveByCredentials
(
array
$credentials
)
{
if
(
empty
(
$credentials
))
{
return
throw
new
UnauthorizedHttpException
(
'auth params error'
,
'参数缺少'
,
null
,
ResponseCodeEnum
::
CLIENT_PARAMETER_ERROR
);
throw
new
UnauthorizedHttpException
(
'auth params error'
,
'参数缺少'
,
null
,
ResponseCodeEnum
::
CLIENT_PARAMETER_ERROR
);
}
$query
=
$this
->
model
->
newQuery
();
...
...
@@ -100,10 +100,10 @@ class AdminUsersProvider implements UserProvider
{
$encodePassword
=
$this
->
model
->
encryptPassword
(
$credentials
[
'password'
]);
if
(
$encodePassword
!==
$user
->
password
){
return
throw
new
AuthenticationException
(
'用户登陆密码错误,请重新输入.'
);
throw
new
AuthenticationException
(
'用户登陆密码错误,请重新输入.'
);
}
if
(
$user
->
status
===
0
){
return
throw
new
AuthenticationException
(
'用户已被禁用,请联系管理员.'
);
throw
new
AuthenticationException
(
'用户已被禁用,请联系管理员.'
);
}
return
true
;
}
...
...
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