From df8fc185a0e4922e78afb362da76ae80e65efc77 Mon Sep 17 00:00:00 2001 From: Zach Rice Date: Thu, 4 Jun 2026 23:35:40 -0400 Subject: [PATCH] fix: respect system notification setting on OAuth2 user creation The notifications_enabled flag was not being set on automatically created user accounts, causing notifications to remain disabled even when the system setting "Enable notifications by default for all new users" was on. --- User/GenericOAuth2UserProvider.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/User/GenericOAuth2UserProvider.php b/User/GenericOAuth2UserProvider.php index 7e501fa..0647ced 100644 --- a/User/GenericOAuth2UserProvider.php +++ b/User/GenericOAuth2UserProvider.php @@ -78,10 +78,16 @@ public function getExternalIdColumn() public function getExtraAttributes() { if ($this->isUserCreationAllowed()) { - return array( + $attributes = array( 'is_ldap_user' => 1, 'disable_login_form' => 1, ); + + if ($this->configModel->get('notifications_enabled', 0) == 1) { + $attributes['notifications_enabled'] = 1; + } + + return $attributes; } return array();