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
546c81a1
Commit
546c81a1
authored
Oct 12, 2014
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some password reset stuff.
parent
f2279c02
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
26 deletions
+26
-26
PasswordController.php
app/Http/Controllers/Auth/PasswordController.php
+13
-13
User.php
app/User.php
+4
-4
app.php
config/app.php
+1
-1
auth.php
config/auth.php
+8
-8
password.blade.php
resources/views/emails/auth/password.blade.php
+0
-0
No files found.
app/Http/Controllers/Auth/
Reminders
Controller.php
→
app/Http/Controllers/Auth/
Password
Controller.php
View file @
546c81a1
...
@@ -8,17 +8,17 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
...
@@ -8,17 +8,17 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @Middleware("csrf")
* @Middleware("csrf")
* @Middleware("guest")
* @Middleware("guest")
*/
*/
class
Reminders
Controller
{
class
Password
Controller
{
/**
/**
* The password
remind
er implementation.
* The password
brok
er implementation.
*
*
* @var PasswordBroker
* @var PasswordBroker
*/
*/
protected
$passwords
;
protected
$passwords
;
/**
/**
* Create a new password
reminder
controller instance.
* Create a new password controller instance.
*
*
* @param PasswordBroker $passwords
* @param PasswordBroker $passwords
* @return void
* @return void
...
@@ -29,33 +29,33 @@ class RemindersController {
...
@@ -29,33 +29,33 @@ class RemindersController {
}
}
/**
/**
* Display the
password reminder view
.
* Display the
form to request a password reset link
.
*
*
* @Get("password/
remind
")
* @Get("password/
email
")
*
*
* @return Response
* @return Response
*/
*/
public
function
showRe
minder
Form
()
public
function
showRe
setRequest
Form
()
{
{
return
view
(
'password.
remind
'
);
return
view
(
'password.
email
'
);
}
}
/**
/**
*
Handle a POST request to remind a user of their password
.
*
Send a reset link to the given user
.
*
*
* @Post("password/
remind
")
* @Post("password/
email
")
*
*
* @param Request $request
* @param Request $request
* @return Response
* @return Response
*/
*/
public
function
sendPasswordReset
Email
(
Request
$request
)
public
function
sendPasswordReset
Link
(
Request
$request
)
{
{
switch
(
$response
=
$this
->
passwords
->
remind
(
$request
->
only
(
'email'
)))
switch
(
$response
=
$this
->
passwords
->
sendResetLink
(
$request
->
only
(
'email'
)))
{
{
case
PasswordBroker
::
INVALID_USER
:
case
PasswordBroker
::
INVALID_USER
:
return
redirect
()
->
back
()
->
with
(
'error'
,
trans
(
$response
));
return
redirect
()
->
back
()
->
with
(
'error'
,
trans
(
$response
));
case
PasswordBroker
::
RE
MINDER
_SENT
:
case
PasswordBroker
::
RE
SET_LINK
_SENT
:
return
redirect
()
->
back
()
->
with
(
'status'
,
trans
(
$response
));
return
redirect
()
->
back
()
->
with
(
'status'
,
trans
(
$response
));
}
}
}
}
...
@@ -79,7 +79,7 @@ class RemindersController {
...
@@ -79,7 +79,7 @@ class RemindersController {
}
}
/**
/**
*
Handle a POST request to reset a
user's password.
*
Reset the given
user's password.
*
*
* @Post("password/reset")
* @Post("password/reset")
*
*
...
...
app/User.php
View file @
546c81a1
...
@@ -2,13 +2,13 @@
...
@@ -2,13 +2,13 @@
use
Illuminate\Auth\UserTrait
;
use
Illuminate\Auth\UserTrait
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Auth\Reminders\RemindableTrait
;
use
Illuminate\Contracts\Auth\User
as
UserContract
;
use
Illuminate\Contracts\Auth\User
as
UserContract
;
use
Illuminate\Contracts\Auth\Remindable
as
RemindableContract
;
use
Illuminate\Auth\Reminders\CanResetPasswordTrait
;
use
Illuminate\Contracts\Auth\CanResetPassword
as
CanResetPasswordContract
;
class
User
extends
Model
implements
UserContract
,
Remindable
Contract
{
class
User
extends
Model
implements
UserContract
,
CanResetPassword
Contract
{
use
UserTrait
,
Remindable
Trait
;
use
UserTrait
,
CanResetPassword
Trait
;
/**
/**
* The database table used by the model.
* The database table used by the model.
...
...
config/app.php
View file @
546c81a1
...
@@ -123,7 +123,7 @@ return [
...
@@ -123,7 +123,7 @@ return [
'Illuminate\Pagination\PaginationServiceProvider'
,
'Illuminate\Pagination\PaginationServiceProvider'
,
'Illuminate\Queue\QueueServiceProvider'
,
'Illuminate\Queue\QueueServiceProvider'
,
'Illuminate\Redis\RedisServiceProvider'
,
'Illuminate\Redis\RedisServiceProvider'
,
'Illuminate\Auth\
Reminders\Reminder
ServiceProvider'
,
'Illuminate\Auth\
Passwords\PasswordReset
ServiceProvider'
,
'Illuminate\Session\SessionServiceProvider'
,
'Illuminate\Session\SessionServiceProvider'
,
'Illuminate\Translation\TranslationServiceProvider'
,
'Illuminate\Translation\TranslationServiceProvider'
,
'Illuminate\Validation\ValidationServiceProvider'
,
'Illuminate\Validation\ValidationServiceProvider'
,
...
...
config/auth.php
View file @
546c81a1
...
@@ -45,22 +45,22 @@ return [
...
@@ -45,22 +45,22 @@ return [
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Password Re
minder
Settings
| Password Re
set
Settings
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| Here you may set the
settings for password reminders, including a
view
| Here you may set the
options for resetting passwords including the
view
| that
should be used as your password reminder e-mail. You will also
| that
is your password reset e-mail. You can also set the name of the
|
be able to set the name of the table that holds the reset tokens
.
|
table that maintains all of the reset tokens for your application
.
|
|
| The
"expire" time is the number of minutes that the reminder
should be
| The
expire time is the number of minutes that the reset token
should be
| considered valid. This security feature keeps tokens short-lived so
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
| they have less time to be guessed. You may change this as needed.
|
|
*/
*/
'
reminder
'
=>
[
'
password
'
=>
[
'email'
=>
'emails.auth.
reminder
'
,
'email'
=>
'emails.auth.
password
'
,
'table'
=>
'password_re
minder
s'
,
'table'
=>
'password_re
set
s'
,
'expire'
=>
60
,
'expire'
=>
60
,
],
],
...
...
resources/views/emails/auth/
reminder
.blade.php
→
resources/views/emails/auth/
password
.blade.php
View file @
546c81a1
File moved
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