diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 2106a599712..3938f64a3a2 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -753,7 +753,7 @@ class UsersController extends AUserData { } // Fallback to display name value to avoid changing behavior with the new option. - if ($this->config->getSystemValue('allow_user_to_change_email', $allowDisplayNameChange)) { + if ($this->config->getSystemValue('allow_user_to_change_email', true)) { $permittedFields[] = IAccountManager::PROPERTY_EMAIL; } @@ -913,8 +913,7 @@ class UsersController extends AUserData { $permittedFields[] = IAccountManager::PROPERTY_DISPLAYNAME; } - // Fallback to display name value to avoid changing behavior with the new option. - if ($this->config->getSystemValue('allow_user_to_change_email', $allowDisplayNameChange)) { + if ($this->config->getSystemValue('allow_user_to_change_email', true)) { $permittedFields[] = IAccountManager::PROPERTY_EMAIL; } diff --git a/core/Migrations/Version32000Date20250402182800.php b/core/Migrations/Version32000Date20250402182800.php new file mode 100644 index 00000000000..c63e95766f5 --- /dev/null +++ b/core/Migrations/Version32000Date20250402182800.php @@ -0,0 +1,33 @@ +config->getSystemValue('allow_user_to_change_display_name', null); + $allowEmail = $this->config->getSystemValue('allow_user_to_change_email', null); + + // if displayname was set, but not the email setting, then set the email setting to the same as the email setting + if ($allowDisplayName !== null && $allowEmail === null) { + $this->config->setSystemValue('allow_user_to_change_email', $allowDisplayName === true); + } + } + +} diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 0bb13854d9a..8be4179886b 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -1377,6 +1377,7 @@ return array( 'OC\\Core\\Migrations\\Version30000Date20240814180800' => $baseDir . '/core/Migrations/Version30000Date20240814180800.php', 'OC\\Core\\Migrations\\Version30000Date20240815080800' => $baseDir . '/core/Migrations/Version30000Date20240815080800.php', 'OC\\Core\\Migrations\\Version30000Date20240906095113' => $baseDir . '/core/Migrations/Version30000Date20240906095113.php', + 'OC\\Core\\Migrations\\Version32000Date20250402182800' => $baseDir . '/core/Migrations/Version32000Date20250402182800.php', 'OC\\Core\\Notification\\CoreNotifier' => $baseDir . '/core/Notification/CoreNotifier.php', 'OC\\Core\\ResponseDefinitions' => $baseDir . '/core/ResponseDefinitions.php', 'OC\\Core\\Service\\LoginFlowV2Service' => $baseDir . '/core/Service/LoginFlowV2Service.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index 8ae4a9dc23d..310f9bb1b79 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -1410,6 +1410,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2 'OC\\Core\\Migrations\\Version30000Date20240814180800' => __DIR__ . '/../../..' . '/core/Migrations/Version30000Date20240814180800.php', 'OC\\Core\\Migrations\\Version30000Date20240815080800' => __DIR__ . '/../../..' . '/core/Migrations/Version30000Date20240815080800.php', 'OC\\Core\\Migrations\\Version30000Date20240906095113' => __DIR__ . '/../../..' . '/core/Migrations/Version30000Date20240906095113.php', + 'OC\\Core\\Migrations\\Version32000Date20250402182800' => __DIR__ . '/../../..' . '/core/Migrations/Version32000Date20250402182800.php', 'OC\\Core\\Notification\\CoreNotifier' => __DIR__ . '/../../..' . '/core/Notification/CoreNotifier.php', 'OC\\Core\\ResponseDefinitions' => __DIR__ . '/../../..' . '/core/ResponseDefinitions.php', 'OC\\Core\\Service\\LoginFlowV2Service' => __DIR__ . '/../../..' . '/core/Service/LoginFlowV2Service.php', diff --git a/lib/private/User/User.php b/lib/private/User/User.php index 1f519179065..5958a247025 100644 --- a/lib/private/User/User.php +++ b/lib/private/User/User.php @@ -429,8 +429,7 @@ class User implements IUser { } public function canChangeEmail(): bool { - // Fallback to display name value to avoid changing behavior with the new option. - return $this->config->getSystemValueBool('allow_user_to_change_email', $this->config->getSystemValueBool('allow_user_to_change_display_name', true)); + return $this->config->getSystemValueBool('allow_user_to_change_email', true); } /** diff --git a/version.php b/version.php index 673825cbbbc..3cfae8fa777 100644 --- a/version.php +++ b/version.php @@ -9,7 +9,7 @@ // between betas, final and RCs. This is _not_ the public version number. Reset minor/patch level // when updating major/minor version number. -$OC_Version = [30, 0, 8, 1]; +$OC_Version = [30, 0, 8, 2]; // The human-readable string $OC_VersionString = '30.0.8';