2016-09-03 21:09:00 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Controllers\Auth;
|
|
|
|
|
2016-11-05 01:50:47 +00:00
|
|
|
use Pterodactyl\Models\User;
|
2016-09-03 21:09:00 +00:00
|
|
|
use Pterodactyl\Http\Controllers\Controller;
|
|
|
|
use Illuminate\Foundation\Auth\ResetsPasswords;
|
|
|
|
|
|
|
|
class ResetPasswordController extends Controller
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Password Reset Controller
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| This controller is responsible for handling password reset requests
|
|
|
|
| and uses a simple trait to include this behavior. You're free to
|
|
|
|
| explore this trait and override any methods you wish to tweak.
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
use ResetsPasswords;
|
|
|
|
|
2017-03-19 23:36:50 +00:00
|
|
|
/**
|
|
|
|
* The URL to redirect users to after password reset.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
2016-09-04 23:08:46 +00:00
|
|
|
public $redirectTo = '/';
|
|
|
|
|
2016-09-03 21:09:00 +00:00
|
|
|
/**
|
|
|
|
* Create a new controller instance.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
$this->middleware('guest');
|
|
|
|
}
|
2016-10-30 20:02:39 +00:00
|
|
|
|
2017-03-19 23:36:50 +00:00
|
|
|
/**
|
|
|
|
* Return the rules used when validating password reset.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
2016-12-07 22:46:38 +00:00
|
|
|
protected function rules()
|
|
|
|
{
|
2016-10-30 20:02:39 +00:00
|
|
|
return [
|
2017-04-28 03:44:26 +00:00
|
|
|
'token' => 'required',
|
|
|
|
'email' => 'required|email',
|
2016-10-30 20:02:39 +00:00
|
|
|
'password' => 'required|confirmed|' . User::PASSWORD_RULES,
|
|
|
|
];
|
|
|
|
}
|
2016-09-03 21:09:00 +00:00
|
|
|
}
|