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
70e35fb3
Commit
70e35fb3
authored
Jul 08, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring auth class.
parent
06cb63f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
arr.php
system/arr.php
+2
-0
auth.php
system/auth.php
+2
-5
No files found.
system/arr.php
View file @
70e35fb3
...
@@ -5,6 +5,8 @@ class Arr {
...
@@ -5,6 +5,8 @@ class Arr {
/**
/**
* Get an item from an array.
* Get an item from an array.
*
*
* If the specified key is null, the entire array will be returned.
*
* @param array $array
* @param array $array
* @param string $key
* @param string $key
* @param mixed $default
* @param mixed $default
...
...
system/auth.php
View file @
70e35fb3
...
@@ -64,11 +64,7 @@ class Auth {
...
@@ -64,11 +64,7 @@ class Auth {
if
(
!
is_null
(
$user
))
if
(
!
is_null
(
$user
))
{
{
// If a salt is present on the user record, we will recreate the hashed password
if
(
$user
->
password
===
Hash
::
make
(
$password
,
$user
->
salt
)
->
value
)
// using the salt. Otherwise, we will just use a plain hash.
$password
=
(
isset
(
$user
->
salt
))
?
Hash
::
make
(
$password
,
$user
->
salt
)
->
value
:
sha1
(
$password
);
if
(
$user
->
password
===
$password
)
{
{
static
::
$user
=
$user
;
static
::
$user
=
$user
;
...
@@ -89,6 +85,7 @@ class Auth {
...
@@ -89,6 +85,7 @@ class Auth {
public
static
function
logout
()
public
static
function
logout
()
{
{
Session
::
forget
(
static
::
$key
);
Session
::
forget
(
static
::
$key
);
static
::
$user
=
null
;
static
::
$user
=
null
;
}
}
...
...
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