mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 00:04:24 +00:00
Some more confirmation things.
This commit is contained in:
@@ -72,6 +72,7 @@ class UserConfirmation
|
|||||||
if ($confirmAccount === false) {
|
if ($confirmAccount === false) {
|
||||||
Preferences::setForUser($user, 'user_confirmed', true);
|
Preferences::setForUser($user, 'user_confirmed', true);
|
||||||
Preferences::setForUser($user, 'user_confirmed_last_mail', 0);
|
Preferences::setForUser($user, 'user_confirmed_last_mail', 0);
|
||||||
|
Preferences::mark();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -42,9 +42,12 @@ class IsConfirmed
|
|||||||
return redirect()->guest('login');
|
return redirect()->guest('login');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// must the user be confirmed in the first place?
|
||||||
|
$confirmAccount = env('MUST_CONFIRM_ACCOUNT', false);
|
||||||
// user must be logged in, then continue:
|
// user must be logged in, then continue:
|
||||||
$isConfirmed = Preferences::get('user_confirmed', false)->data;
|
$isConfirmed = Preferences::get('user_confirmed', false)->data;
|
||||||
if ($isConfirmed === false) {
|
|
||||||
|
if ($isConfirmed === false && $confirmAccount === true) {
|
||||||
|
|
||||||
// user account is not confirmed, redirect to
|
// user account is not confirmed, redirect to
|
||||||
// confirmation page:
|
// confirmation page:
|
||||||
|
@@ -42,9 +42,11 @@ class IsNotConfirmed
|
|||||||
return redirect()->guest('login');
|
return redirect()->guest('login');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// must the user be confirmed in the first place?
|
||||||
|
$confirmAccount = env('MUST_CONFIRM_ACCOUNT', false);
|
||||||
// user must be logged in, then continue:
|
// user must be logged in, then continue:
|
||||||
$isConfirmed = Preferences::get('user_confirmed', false)->data;
|
$isConfirmed = Preferences::get('user_confirmed', false)->data;
|
||||||
if ($isConfirmed) {
|
if ($isConfirmed || $confirmAccount === false) {
|
||||||
// user account is confirmed, simply send them home.
|
// user account is confirmed, simply send them home.
|
||||||
return redirect(route('home'));
|
return redirect(route('home'));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user