Properly check hashes, issue #456

This commit is contained in:
James Cole
2016-12-12 17:17:36 +01:00
parent ffca4b0543
commit 4dccf7b7b5
3 changed files with 11 additions and 4 deletions

View File

@@ -84,6 +84,7 @@ class UserEventHandler
*/
public function saveEmailAddress(DeletedUser $event): bool
{
Preferences::mark();
$email = hash('sha256', $event->email);
Log::debug(sprintf('Hash of email is %s', $email));
/** @var Configuration $configuration */
@@ -94,7 +95,10 @@ class UserEventHandler
}
$content[] = $email;
$configuration->data = $content;
$configuration->save();
Log::debug('New content of deleted_users is ', $content);
FireflyConfig::set('deleted_users', $content);
Preferences::mark();
return true;
}