mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-13 18:24:13 +00:00
Reset the anonimity.
This commit is contained in:
@@ -177,6 +177,7 @@ class UserEventHandler
|
|||||||
// set user back to English.
|
// set user back to English.
|
||||||
Preferences::setForUser($user, 'language', 'en_US');
|
Preferences::setForUser($user, 'language', 'en_US');
|
||||||
Preferences::setForUser($user, 'locale', 'equal');
|
Preferences::setForUser($user, 'locale', 'equal');
|
||||||
|
Preferences::setForUser($user, 'anonymous', false);
|
||||||
Preferences::mark();
|
Preferences::mark();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -223,7 +224,7 @@ class UserEventHandler
|
|||||||
|
|
||||||
public function sendAdminRegistrationNotification(RegisteredUser $event): void
|
public function sendAdminRegistrationNotification(RegisteredUser $event): void
|
||||||
{
|
{
|
||||||
$sendMail = (bool) app('fireflyconfig')->get('notification_admin_new_reg', true)->data;
|
$sendMail = (bool)app('fireflyconfig')->get('notification_admin_new_reg', true)->data;
|
||||||
if ($sendMail) {
|
if ($sendMail) {
|
||||||
$owner = $event->owner;
|
$owner = $event->owner;
|
||||||
|
|
||||||
@@ -283,7 +284,7 @@ class UserEventHandler
|
|||||||
$oldEmail = $event->oldEmail;
|
$oldEmail = $event->oldEmail;
|
||||||
$user = $event->user;
|
$user = $event->user;
|
||||||
$token = Preferences::getForUser($user, 'email_change_undo_token', 'invalid');
|
$token = Preferences::getForUser($user, 'email_change_undo_token', 'invalid');
|
||||||
$hashed = hash('sha256', sprintf('%s%s', (string) config('app.key'), $oldEmail));
|
$hashed = hash('sha256', sprintf('%s%s', (string)config('app.key'), $oldEmail));
|
||||||
$url = route('profile.undo-email-change', [$token->data, $hashed]);
|
$url = route('profile.undo-email-change', [$token->data, $hashed]);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -366,7 +367,7 @@ class UserEventHandler
|
|||||||
*/
|
*/
|
||||||
public function sendRegistrationMail(RegisteredUser $event): void
|
public function sendRegistrationMail(RegisteredUser $event): void
|
||||||
{
|
{
|
||||||
$sendMail = (bool) app('fireflyconfig')->get('notification_user_new_reg', true)->data;
|
$sendMail = (bool)app('fireflyconfig')->get('notification_user_new_reg', true)->data;
|
||||||
if ($sendMail) {
|
if ($sendMail) {
|
||||||
try {
|
try {
|
||||||
Notification::send($event->user, new UserRegistrationNotification());
|
Notification::send($event->user, new UserRegistrationNotification());
|
||||||
|
|||||||
Reference in New Issue
Block a user