]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Settings/Account.php
Issue 11870: Weeks can now start at every day
[friendica.git] / src / Module / Settings / Account.php
index 33a5feff492d3fba72db77146aac34dd03c16cb5..dcbb1861f209db45b7fe3679413f063c739f867f 100644 (file)
@@ -551,6 +551,9 @@ class Account extends BaseSettings
 
                $notify_type = DI::pConfig()->get(local_user(), 'system', 'notify_type');
 
+               $passwordRules = DI::l10n()->t('Allowed characters are a-z, A-Z, 0-9 and special characters except white spaces, accentuated letters and colon (:).')
+                       . (PASSWORD_DEFAULT === PASSWORD_BCRYPT ? ' ' . DI::l10n()->t('Password length is limited to 72 characters.') : '');
+
                $tpl = Renderer::getMarkupTemplate('settings/account.tpl');
                $o   = Renderer::replaceMacros($tpl, [
                        '$ptitle' => DI::l10n()->t('Account Settings'),
@@ -563,7 +566,7 @@ class Account extends BaseSettings
                        '$open'                => $this->parameters['open'] ?? 'password',
 
                        '$h_pass'        => DI::l10n()->t('Password Settings'),
-                       '$password1'     => ['password', DI::l10n()->t('New Password:'), '', DI::l10n()->t('Allowed characters are a-z, A-Z, 0-9 and special characters except white spaces, accentuated letters and colon (:).'), false, 'autocomplete="off"'],
+                       '$password1'     => ['password', DI::l10n()->t('New Password:'), '', $passwordRules, false, 'autocomplete="off"', User::getPasswordRegExp()],
                        '$password2'     => ['confirm', DI::l10n()->t('Confirm:'), '', DI::l10n()->t('Leave password fields blank unless changing'), false, 'autocomplete="off"'],
                        '$password3'     => ['opassword', DI::l10n()->t('Current Password:'), '', DI::l10n()->t('Your current password to confirm the changes'), false, 'autocomplete="off"'],
                        '$password4'     => ['mpassword', DI::l10n()->t('Password:'), '', DI::l10n()->t('Your current password to confirm the changes of the email address'), false, 'autocomplete="off"'],
@@ -614,7 +617,6 @@ class Account extends BaseSettings
                        '$notify5' => ['notify5', DI::l10n()->t('You receive a private message'), ($notify & Notification\Type::MAIL), Notification\Type::MAIL, ''],
                        '$notify6' => ['notify6', DI::l10n()->t('You receive a friend suggestion'), ($notify & Notification\Type::SUGGEST), Notification\Type::SUGGEST, ''],
                        '$notify7' => ['notify7', DI::l10n()->t('You are tagged in a post'), ($notify & Notification\Type::TAG_SELF), Notification\Type::TAG_SELF, ''],
-                       '$notify8' => ['notify8', DI::l10n()->t('You are poked/prodded/etc. in a post'), ($notify & Notification\Type::POKE), Notification\Type::POKE, ''],
 
                        '$lbl_notify'                    => DI::l10n()->t('Create a desktop notification when:'),
                        '$notify_tagged'                 => ['notify_tagged', DI::l10n()->t('Someone tagged you'), is_null($notify_type) || $notify_type & UserNotification::TYPE_EXPLICIT_TAGGED, ''],