Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
wallet
token
Commits
a13f279b
Commit
a13f279b
authored
5 years ago
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
b556303d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
UserController.php
api/controllers/UserController.php
+2
-1
LoginForm.php
common/models/LoginForm.php
+1
-1
No files found.
api/controllers/UserController.php
View file @
a13f279b
...
...
@@ -20,7 +20,8 @@ class UserController extends BaseController
{
$model
=
new
LoginForm
();
$model
->
setScenario
(
LoginForm
::
SCENARIOS_LOGIN
);
$model
->
load
(
Yii
::
$app
->
request
->
post
());
#var_dump(Yii::$app->request->post());exit;
$model
->
load
(
Yii
::
$app
->
request
->
post
(),
''
);
if
(
$model
->
login
())
{
$response
=
[
'success'
=>
true
,
...
...
This diff is collapsed.
Click to expand it.
common/models/LoginForm.php
View file @
a13f279b
...
...
@@ -81,7 +81,7 @@ class LoginForm extends Model
protected
function
getUser
()
{
if
(
$this
->
_user
===
null
)
{
$this
->
_user
=
User
::
findByUsername
(
$this
->
username
);
$this
->
_user
=
Admin
::
findByUsername
(
$this
->
username
);
}
return
$this
->
_user
;
...
...
This diff is collapsed.
Click to expand it.
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