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
ff525b99
Commit
ff525b99
authored
Jul 10, 2012
by
Jeffrey Way
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add "remember" to ignore list
Signed-off-by:
Jeffrey Way
<
jeffrey@envato.com
>
parent
9dd964c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
eloquent.php
laravel/auth/drivers/eloquent.php
+12
-11
fluent.php
laravel/auth/drivers/fluent.php
+3
-2
No files found.
laravel/auth/drivers/eloquent.php
View file @
ff525b99
...
...
@@ -26,27 +26,28 @@ class Eloquent extends Driver {
*/
public
function
attempt
(
$arguments
=
array
())
{
$user
=
$this
->
model
()
->
where
(
function
(
$query
)
use
(
$arguments
)
{
$user
=
$this
->
model
()
->
where
(
function
(
$query
)
use
(
$arguments
)
{
$username
=
Config
::
get
(
'auth.username'
);
$query
->
where
(
$username
,
'='
,
$arguments
[
'username'
]);
foreach
(
array_except
(
$arguments
,
array
(
'username'
,
'password'
))
as
$column
=>
$val
)
foreach
(
array_except
(
$arguments
,
array
(
'username'
,
'password'
,
'remember'
))
as
$column
=>
$val
)
{
$query
->
where
(
$column
,
'='
,
$val
);
}
})
->
first
();
})
->
first
();
// If the credentials match what is in the database we will just
// log the user into the application and remember them if asked.
$password
=
$arguments
[
'password'
];
// If the credentials match what is in the database we will just
// log the user into the application and remember them if asked.
$password
=
$arguments
[
'password'
];
$password_field
=
Config
::
get
(
'auth.password'
,
'password'
);
$password_field
=
Config
::
get
(
'auth.password'
,
'password'
);
if
(
!
is_null
(
$user
)
and
Hash
::
check
(
$password
,
$user
->
get_attribute
(
$password_field
)))
{
return
$this
->
login
(
$user
->
id
,
array_get
(
$arguments
,
'remember'
));
}
if
(
!
is_null
(
$user
)
and
Hash
::
check
(
$password
,
$user
->
get_attribute
(
$password_field
)))
{
return
$this
->
login
(
$user
->
id
,
array_get
(
$arguments
,
'remember'
));
}
return
false
;
}
...
...
laravel/auth/drivers/fluent.php
View file @
ff525b99
...
...
@@ -56,12 +56,13 @@ class Fluent extends Driver {
{
$table
=
Config
::
get
(
'auth.table'
);
return
DB
::
table
(
$table
)
->
where
(
function
(
$query
)
use
(
$arguments
)
{
return
DB
::
table
(
$table
)
->
where
(
function
(
$query
)
use
(
$arguments
)
{
$username
=
Config
::
get
(
'auth.username'
);
$query
->
where
(
$username
,
'='
,
$arguments
[
'username'
]);
foreach
(
array_except
(
$arguments
,
array
(
'username'
,
'password'
))
as
$column
=>
$val
)
foreach
(
array_except
(
$arguments
,
array
(
'username'
,
'password'
,
'remember'
))
as
$column
=>
$val
)
{
$query
->
where
(
$column
,
'='
,
$val
);
}
...
...
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