2015-02-25 14:19:06 -06:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace FireflyIII\Http\Requests;
|
|
|
|
|
|
|
|
use Auth;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class ProfileFormRequest
|
|
|
|
*
|
2015-05-10 01:08:07 -05:00
|
|
|
* @codeCoverageIgnore
|
2015-02-25 14:19:06 -06:00
|
|
|
* @package FireflyIII\Http\Requests
|
|
|
|
*/
|
|
|
|
class ProfileFormRequest extends Request
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function authorize()
|
|
|
|
{
|
|
|
|
// Only allow logged in users
|
|
|
|
return Auth::check();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function rules()
|
|
|
|
{
|
|
|
|
return [
|
2015-03-29 14:27:51 -05:00
|
|
|
'current_password' => 'required',
|
2015-02-25 14:19:06 -06:00
|
|
|
'new_password' => 'required|confirmed',
|
|
|
|
'new_password_confirmation' => 'required',
|
|
|
|
];
|
|
|
|
}
|
2015-03-29 01:14:32 -05:00
|
|
|
}
|