Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
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
Yeray Santana Hualde
syncEnrollments
Commits
8066a595
Commit
8066a595
authored
Feb 01, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added remember_me cookie config option.
parent
ac277c58
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
11 deletions
+21
-11
auth.php
application/config/auth.php
+14
-1
auth.php
laravel/auth.php
+7
-10
No files found.
application/config/auth.php
View file @
8066a595
...
...
@@ -63,6 +63,19 @@ return array(
|
*/
'logout'
=>
function
(
$user
)
{}
'logout'
=>
function
(
$user
)
{},
/*
|--------------------------------------------------------------------------
| "Remember Me" Cookie Name
|--------------------------------------------------------------------------
|
| Here you may specify the cookie name that will be used for the cookie
| that serves as the "remember me" token. Of course, a sensible default
| has been set for you, so you probably don't need to change it.
|
*/
'cookie'
=>
'laravel_remember'
,
);
\ No newline at end of file
laravel/auth.php
View file @
8066a595
...
...
@@ -16,13 +16,6 @@ class Auth {
*/
const
user_key
=
'laravel_user_id'
;
/**
* The key used when setting the "remember me" cookie.
*
* @var string
*/
const
remember_key
=
'laravel_remember'
;
/**
* Determine if the user of the application is not logged in.
*
...
...
@@ -76,7 +69,7 @@ class Auth {
// exists, we'll attempt to recall the user based on the cookie value.
// Since all cookies contain a fingerprint hash verifying that they
// haven't changed, we can trust it.
$recaller
=
Cookie
::
get
(
Auth
::
remember_key
);
$recaller
=
Cookie
::
get
(
$config
[
'cookie'
]
);
if
(
is_null
(
static
::
$user
)
and
!
is_null
(
$recaller
))
{
...
...
@@ -196,7 +189,9 @@ class Auth {
extract
(
$config
,
EXTR_SKIP
);
Cookie
::
forever
(
Auth
::
remember_key
,
$recaller
,
$path
,
$domain
,
$secure
);
$cookie
=
Config
::
get
(
'auth.cookie'
);
Cookie
::
forever
(
$cookie
,
$recaller
,
$path
,
$domain
,
$secure
);
}
/**
...
...
@@ -220,7 +215,9 @@ class Auth {
// When forgetting the cookie, we need to also pass in the path and
// domain that would have been used when the cookie was originally
// set by the framework, otherwise it will not be deleted.
Cookie
::
forget
(
Auth
::
remember_key
,
$path
,
$domain
,
$secure
);
$cookie
=
Config
::
get
(
'auth.cookie'
);
Cookie
::
forget
(
$cookie
,
$path
,
$domain
,
$secure
);
Session
::
forget
(
Auth
::
user_key
);
}
...
...
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