Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
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
PSDI Army
yii2
Commits
f42af951
Commit
f42af951
authored
Feb 16, 2014
by
Johnny Theill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix newlines and missing parameter description
parent
63272f41
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
14 additions
and
22 deletions
+14
-22
SiteController.php
apps/advanced/backend/controllers/SiteController.php
+1
-2
LoginForm.php
apps/advanced/common/models/LoginForm.php
+4
-4
User.php
apps/advanced/common/models/User.php
+3
-4
SiteController.php
apps/advanced/frontend/controllers/SiteController.php
+1
-2
ContactForm.php
apps/advanced/frontend/models/ContactForm.php
+1
-2
PasswordResetRequestForm.php
apps/advanced/frontend/models/PasswordResetRequestForm.php
+1
-2
ResetPasswordForm.php
apps/advanced/frontend/models/ResetPasswordForm.php
+1
-2
SignupForm.php
apps/advanced/frontend/models/SignupForm.php
+1
-2
SiteController.php
apps/basic/controllers/SiteController.php
+1
-2
No files found.
apps/advanced/backend/controllers/SiteController.php
View file @
f42af951
...
...
@@ -72,4 +72,4 @@ class SiteController extends Controller
Yii
::
$app
->
user
->
logout
();
return
$this
->
goHome
();
}
}
\ No newline at end of file
}
apps/advanced/common/models/LoginForm.php
View file @
f42af951
<?php
namespace
common\models
;
use
yii\base\Model
;
use
Yii
;
use
yii\base\Model
;
/**
* Login form
...
...
@@ -44,12 +44,13 @@ class LoginForm extends Model
/**
* Logs in a user using the provided username and password.
*
* @return boolean whether the user is logged in successfully
*/
public
function
login
()
{
if
(
$this
->
validate
())
{
return
Yii
::
$app
->
user
->
login
(
$this
->
getUser
(),
$this
->
rememberMe
?
3600
*
24
*
30
:
0
);
return
Yii
::
$app
->
user
->
login
(
$this
->
getUser
(),
$this
->
rememberMe
?
3600
*
24
*
30
:
0
);
}
else
{
return
false
;
}
...
...
@@ -67,4 +68,4 @@ class LoginForm extends Model
}
return
$this
->
_user
;
}
}
\ No newline at end of file
}
apps/advanced/common/models/User.php
View file @
f42af951
...
...
@@ -30,8 +30,8 @@ class User extends ActiveRecord implements IdentityInterface
/**
* Creates a new user
*
* @param
$attributes
* @return static|null
* @param
array $attributes the attributes given by field => value
* @return static|null
the newly created model, or null on failure
*/
public
static
function
create
(
$attributes
)
{
...
...
@@ -195,4 +195,4 @@ class User extends ActiveRecord implements IdentityInterface
[
'email'
,
'unique'
],
];
}
}
\ No newline at end of file
}
apps/advanced/frontend/controllers/SiteController.php
View file @
f42af951
...
...
@@ -153,4 +153,4 @@ class SiteController extends Controller
'model'
=>
$model
,
]);
}
}
\ No newline at end of file
}
apps/advanced/frontend/models/ContactForm.php
View file @
f42af951
...
...
@@ -61,4 +61,4 @@ class ContactForm extends Model
return
false
;
}
}
}
\ No newline at end of file
}
apps/advanced/frontend/models/PasswordResetRequestForm.php
View file @
f42af951
...
...
@@ -52,4 +52,4 @@ class PasswordResetRequestForm extends Model
return
false
;
}
}
\ No newline at end of file
}
apps/advanced/frontend/models/ResetPasswordForm.php
View file @
f42af951
...
...
@@ -60,4 +60,4 @@ class ResetPasswordForm extends Model
$user
->
removePasswordResetToken
();
return
$user
->
save
();
}
}
\ No newline at end of file
}
apps/advanced/frontend/models/SignupForm.php
View file @
f42af951
...
...
@@ -46,4 +46,4 @@ class SignupForm extends Model
}
return
null
;
}
}
\ No newline at end of file
}
apps/basic/controllers/SiteController.php
View file @
f42af951
...
...
@@ -91,4 +91,4 @@ class SiteController extends Controller
{
return
$this
->
render
(
'about'
);
}
}
\ No newline at end of file
}
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