@@ -10,11 +10,11 @@ namespace LORIS\my_preferences;
1010class My_Preferences extends \NDB_Form
1111{
1212 // Use gettext for error messages
13- private const PASSWORD_ERROR_IS_EMAIL = 'Your password cannot be your email. ' ;
14- private const PASSWORD_ERROR_IS_USER = 'Your password cannot be your user name . ' ;
13+ private const PASSWORD_ERROR_IS_EMAIL = 'Your password can ' t be your email.';
14+ private const PASSWORD_ERROR_IS_USER = ' Your password can't be your username .';
1515 private const PASSWORD_ERROR_NO_MATCH = ' The passwords do not match .';
16- private const PASSWORD_ERROR_NO_CHANGE
17- = ' New and old passwords are identical: please choose another one ' ;
16+ private const PASSWORD_ERROR_NO_CHANGE = ' New and old passwords are identical:'
17+ . ' please choose another one ' ;
1818
1919 /**
2020 * Computes the initial values this page will be filled with.
@@ -86,7 +86,8 @@ class My_Preferences extends \NDB_Form
8686 foreach ($ operations as $ operation => $ services ) {
8787 unset($ services ['desc ' ]);
8888 foreach ($ services as $ service => $ subscribed ) {
89- $ var_name = "notif_ " . $ module . "_ " . $ operation . "_ " . $ service ;
89+ $ var_name
90+ = "notif_ " . $ module . "_ " . $ operation . "_ " . $ service ;
9091
9192 if ($ subscribed === 'Y ' ) {
9293 $ defaults [$ var_name ] = 'on ' ;
@@ -461,7 +462,8 @@ class My_Preferences extends \NDB_Form
461462 $ decoded = htmlspecialchars_decode ($ plaintext );
462463 new \Password ($ decoded );
463464 // New password must be different than current one
464- if (! \User::factory ($ this ->identifier )->isPasswordDifferent ($ decoded )) {
465+ if (!\User::factory ($ this ->identifier )->isPasswordDifferent ($ decoded )
466+ ) {
465467 $ errors ['Password_Group ' ] = dgettext (
466468 'my_preferences ' ,
467469 self ::PASSWORD_ERROR_NO_CHANGE
0 commit comments