@@ -10,11 +10,11 @@ namespace LORIS\my_preferences;
10
10
class My_Preferences extends \NDB_Form
11
11
{
12
12
// 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 .';
15
15
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 ' ;
18
18
19
19
/**
20
20
* Computes the initial values this page will be filled with.
@@ -86,7 +86,8 @@ class My_Preferences extends \NDB_Form
86
86
foreach ($ operations as $ operation => $ services ) {
87
87
unset($ services ['desc ' ]);
88
88
foreach ($ services as $ service => $ subscribed ) {
89
- $ var_name = "notif_ " . $ module . "_ " . $ operation . "_ " . $ service ;
89
+ $ var_name
90
+ = "notif_ " . $ module . "_ " . $ operation . "_ " . $ service ;
90
91
91
92
if ($ subscribed === 'Y ' ) {
92
93
$ defaults [$ var_name ] = 'on ' ;
@@ -461,7 +462,8 @@ class My_Preferences extends \NDB_Form
461
462
$ decoded = htmlspecialchars_decode ($ plaintext );
462
463
new \Password ($ decoded );
463
464
// 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
+ ) {
465
467
$ errors ['Password_Group ' ] = dgettext (
466
468
'my_preferences ' ,
467
469
self ::PASSWORD_ERROR_NO_CHANGE
0 commit comments