mirror of
https://github.com/flarum/core.git
synced 2025-10-13 07:54:25 +02:00
User Preferences Extender and Tests (#2463)
This commit is contained in:
committed by
GitHub
parent
641619e820
commit
eed407812f
@@ -41,7 +41,7 @@ class AlertNotificationDriver implements NotificationDriverInterface
|
||||
*/
|
||||
public function registerType(string $blueprintClass, array $driversEnabledByDefault): void
|
||||
{
|
||||
User::addPreference(
|
||||
User::registerPreference(
|
||||
User::getNotificationPreferenceKey($blueprintClass::getType(), 'alert'),
|
||||
'boolval',
|
||||
in_array('alert', $driversEnabledByDefault)
|
||||
|
@@ -59,7 +59,7 @@ class EmailNotificationDriver implements NotificationDriverInterface
|
||||
public function registerType(string $blueprintClass, array $driversEnabledByDefault): void
|
||||
{
|
||||
if ((new ReflectionClass($blueprintClass))->implementsInterface(MailableInterface::class)) {
|
||||
User::addPreference(
|
||||
User::registerPreference(
|
||||
User::getNotificationPreferenceKey($blueprintClass::getType(), 'email'),
|
||||
'boolval',
|
||||
in_array('email', $driversEnabledByDefault)
|
||||
|
Reference in New Issue
Block a user