Users can no longer be required to activate their account. They are always activated.

This commit is contained in:
James Cole 2016-12-28 16:55:53 +01:00
parent a3f1b72bac
commit 98d4bc48b6
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
4 changed files with 5 additions and 6 deletions

View File

@ -59,13 +59,12 @@ class ConfigurationController extends Controller
// all available configuration and their default value in case
// they don't exist yet.
$singleUserMode = FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
$mustConfirmAccount = FireflyConfig::get('must_confirm_account', config('firefly.configuration.must_confirm_account'))->data;
$isDemoSite = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;
$siteOwner = env('SITE_OWNER');
return view(
'admin.configuration.index',
compact('subTitle', 'subTitleIcon', 'singleUserMode', 'mustConfirmAccount', 'isDemoSite', 'siteOwner')
compact('subTitle', 'subTitleIcon', 'singleUserMode', 'isDemoSite', 'siteOwner')
);
}
@ -82,7 +81,6 @@ class ConfigurationController extends Controller
// store config values
FireflyConfig::set('single_user_mode', $data['single_user_mode']);
FireflyConfig::set('must_confirm_account', $data['must_confirm_account']);
FireflyConfig::set('is_demo_site', $data['is_demo_site']);
// flash message

View File

@ -21,6 +21,7 @@ use FireflyIII\User;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Http\Request;
use Log;
use Preferences;
use Session;
use Validator;
@ -97,6 +98,9 @@ class RegisterController extends Controller
$user = $this->create($request->all());
// trigger user registration event:
// automatically activate user:
Preferences::setForUser($user, 'user_confirmed', true);
Preferences::setForUser($user, 'user_confirmed_last_mail', 0);
event(new RegisteredUser($user, $request->ip()));
Auth::login($user);

View File

@ -37,7 +37,6 @@ class ConfigurationRequest extends Request
{
return [
'single_user_mode' => intval($this->get('single_user_mode')) === 1,
'must_confirm_account' => intval($this->get('must_confirm_account')) === 1,
'is_demo_site' => intval($this->get('is_demo_site')) === 1,
];
}
@ -49,7 +48,6 @@ class ConfigurationRequest extends Request
{
$rules = [
'single_user_mode' => 'between:0,1|numeric',
'must_confirm_account' => 'between:0,1|numeric',
'is_demo_site' => 'between:0,1|numeric',
];

View File

@ -41,7 +41,6 @@ class EventServiceProvider extends ServiceProvider
[
'FireflyIII\Handlers\Events\UserEventHandler@sendRegistrationMail',
'FireflyIII\Handlers\Events\UserEventHandler@attachUserRole',
'FireflyIII\Handlers\Events\UserEventHandler@sendConfirmationMessage',
],
'FireflyIII\Events\RequestedNewPassword' => [ // is a User related event.
'FireflyIII\Handlers\Events\UserEventHandler@sendNewPassword',