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
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
5 additions
and
4 deletions
+5
-4
SiteController.php
apps/advanced/backend/controllers/SiteController.php
+0
-0
LoginForm.php
apps/advanced/common/models/LoginForm.php
+3
-2
User.php
apps/advanced/common/models/User.php
+2
-2
SiteController.php
apps/advanced/frontend/controllers/SiteController.php
+0
-0
ContactForm.php
apps/advanced/frontend/models/ContactForm.php
+0
-0
PasswordResetRequestForm.php
apps/advanced/frontend/models/PasswordResetRequestForm.php
+0
-0
ResetPasswordForm.php
apps/advanced/frontend/models/ResetPasswordForm.php
+0
-0
SignupForm.php
apps/advanced/frontend/models/SignupForm.php
+0
-0
SiteController.php
apps/basic/controllers/SiteController.php
+0
-0
No files found.
apps/advanced/backend/controllers/SiteController.php
View file @
f42af951
apps/advanced/common/models/LoginForm.php
View file @
f42af951
<?php
<?php
namespace
common\models
;
namespace
common\models
;
use
yii\base\Model
;
use
Yii
;
use
Yii
;
use
yii\base\Model
;
/**
/**
* Login form
* Login form
...
@@ -44,12 +44,13 @@ class LoginForm extends Model
...
@@ -44,12 +44,13 @@ class LoginForm extends Model
/**
/**
* Logs in a user using the provided username and password.
* Logs in a user using the provided username and password.
*
* @return boolean whether the user is logged in successfully
* @return boolean whether the user is logged in successfully
*/
*/
public
function
login
()
public
function
login
()
{
{
if
(
$this
->
validate
())
{
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
{
}
else
{
return
false
;
return
false
;
}
}
...
...
apps/advanced/common/models/User.php
View file @
f42af951
...
@@ -30,8 +30,8 @@ class User extends ActiveRecord implements IdentityInterface
...
@@ -30,8 +30,8 @@ class User extends ActiveRecord implements IdentityInterface
/**
/**
* Creates a new user
* Creates a new user
*
*
* @param
$attributes
* @param
array $attributes the attributes given by field => value
* @return static|null
* @return static|null
the newly created model, or null on failure
*/
*/
public
static
function
create
(
$attributes
)
public
static
function
create
(
$attributes
)
{
{
...
...
apps/advanced/frontend/controllers/SiteController.php
View file @
f42af951
apps/advanced/frontend/models/ContactForm.php
View file @
f42af951
apps/advanced/frontend/models/PasswordResetRequestForm.php
View file @
f42af951
apps/advanced/frontend/models/ResetPasswordForm.php
View file @
f42af951
apps/advanced/frontend/models/SignupForm.php
View file @
f42af951
apps/basic/controllers/SiteController.php
View file @
f42af951
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