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

45 lines
896 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.
*/
2016-02-05 12:08:25 +01:00
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()
{
return [
2015-03-29 21:27:51 +02:00
'current_password' => 'required',
2015-02-25 21:19:06 +01:00
'new_password' => 'required|confirmed',
'new_password_confirmation' => 'required',
];
}
2015-03-29 08:14:32 +02:00
}