Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
70e35fb3
Commit
70e35fb3
authored
Jul 07, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring auth class.
parent
06cb63f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
system/arr.php
+2
-0
system/auth.php
+2
-5
No files found.
system/arr.php
View file @
70e35fb3
...
...
@@ -5,6 +5,8 @@ class Arr {
/**
* Get an item from an array.
*
* If the specified key is null, the entire array will be returned.
*
* @param array $array
* @param string $key
* @param mixed $default
...
...
system/auth.php
View file @
70e35fb3
...
...
@@ -64,11 +64,7 @@ class Auth {
if
(
!
is_null
(
$user
))
{
// If a salt is present on the user record, we will recreate the hashed password
// 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
)
if
(
$user
->
password
===
Hash
::
make
(
$password
,
$user
->
salt
)
->
value
)
{
static
::
$user
=
$user
;
...
...
@@ -89,6 +85,7 @@ class Auth {
public
static
function
logout
()
{
Session
::
forget
(
static
::
$key
);
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