Files
firefly-iii/app/Http/Requests/ProfileFormRequest.php

46 lines
927 B
PHP
Raw Normal View History

2015-02-25 21:19:06 +01:00
<?php
/**
* ProfileFormRequest.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types=1);
2015-02-25 21:19:06 +01:00
namespace FireflyIII\Http\Requests;
/**
* Class ProfileFormRequest
*
2016-02-04 07:28:39 +01:00
*
2015-02-25 21:19:06 +01:00
* @package FireflyIII\Http\Requests
*/
class ProfileFormRequest extends Request
{
/**
* @return bool
*/
public function authorize()
{
// Only allow logged in users
2016-09-16 12:07:45 +02:00
return auth()->check();
2015-02-25 21:19:06 +01:00
}
/**
* @return array
*/
public function rules()
{
2017-09-12 21:44:31 +02:00
// fixed
2015-02-25 21:19:06 +01:00
return [
2015-03-29 21:27:51 +02:00
'current_password' => 'required',
2017-08-04 15:46:52 +02:00
'new_password' => 'required|confirmed|secure_password',
2015-02-25 21:19:06 +01:00
'new_password_confirmation' => 'required',
];
}
2015-03-29 08:14:32 +02:00
}