@@ -245,8 +245,7 @@ class Edit_User extends \NDB_Form
245245 // Keep old permissions if the editor is not allowed to edit them,
246246 // unless editor is superuser
247247 foreach ($ current_permissionids as $ perm ) {
248- if (
249- !in_array ($ perm , $ newPermissions )
248+ if (!in_array ($ perm , $ newPermissions )
250249 && !in_array ($ perm , $ editorPermissions )
251250 && !$ editor ->hasPermission ('superuser ' )
252251 ) {
@@ -426,8 +425,7 @@ class Edit_User extends \NDB_Form
426425 );
427426
428427 // START EXAMINER UPDATE
429- if (
430- !empty ($ ex_radiologist )
428+ if (!empty ($ ex_radiologist )
431429 && !empty ($ ex_pending )
432430 && !empty ($ ex_curr_sites )
433431 && count ($ examinerID ) === 0
@@ -449,8 +447,7 @@ class Edit_User extends \NDB_Form
449447 WHERE userID=:uid " ,
450448 ['uid ' => $ uid ]
451449 );
452- } elseif (
453- count ($ examinerID ) > 0
450+ } elseif (count ($ examinerID ) > 0
454451 && ((!empty ($ ex_radiologist )
455452 && !empty ($ ex_pending )
456453 && !empty ($ ex_curr_sites ))
@@ -1112,8 +1109,7 @@ class Edit_User extends \NDB_Form
11121109 "user_accounts " ,
11131110 "You must enter a user name or choose to make it match the email address "
11141111 );
1115- } elseif (
1116- !empty ($ values ['UserID ' ])
1112+ } elseif (!empty ($ values ['UserID ' ])
11171113 || ($ values ['NA_UserID ' ] == 'on ' && $ values ['Email ' ])
11181114 ) {
11191115 // Either specified a UID or clicked on "UID = email"
@@ -1167,8 +1163,7 @@ class Edit_User extends \NDB_Form
11671163 // Do not show this error if the password is an empty string: in this
11681164 // case, that means the email is empty also. It's more appropriate to
11691165 // display only the error 'You must enter an email'.
1170- if (
1171- $ values ['Email ' ] === $ values ['Password_hash ' ]
1166+ if ($ values ['Email ' ] === $ values ['Password_hash ' ]
11721167 && $ values ['Password_hash ' ] !== ''
11731168 ) {
11741169 $ errors ['Password ' ] = self ::PASSWORD_ERROR_IS_EMAIL ;
@@ -1179,8 +1174,7 @@ class Edit_User extends \NDB_Form
11791174 // case 2 - New user and Make user name match email address checked
11801175 // already handled in email/password check
11811176 // case 3 - Edit user
1182- if (
1183- (isset ($ values ['UserID ' ]) && !isset ($ values ['NA_UserID ' ])
1177+ if ((isset ($ values ['UserID ' ]) && !isset ($ values ['NA_UserID ' ])
11841178 && $ values ['UserID ' ] === $ values ['Password_hash ' ])
11851179 || (!empty ($ this ->identifier )
11861180 && $ this ->identifier === $ values ['Password_hash ' ])
@@ -1198,8 +1192,7 @@ class Edit_User extends \NDB_Form
11981192 // case of new user the password column will be null
11991193 // so either password should be set or
12001194 // password should be generated
1201- if (
1202- is_null ($ pass )
1195+ if (is_null ($ pass )
12031196 && empty ($ values ['Password_hash ' ])
12041197 && $ values ['NA_Password ' ] != 'on '
12051198 ) {
@@ -1214,8 +1207,7 @@ class Edit_User extends \NDB_Form
12141207 }
12151208
12161209 // if password is user-defined, and user wants to change password
1217- if (
1218- empty ($ values ['NA_Password ' ])
1210+ if (empty ($ values ['NA_Password ' ])
12191211 && (!empty ($ values ['Password_hash ' ]) || !empty ($ values ['__Confirm ' ]))
12201212 ) {
12211213 try {
@@ -1235,8 +1227,7 @@ class Edit_User extends \NDB_Form
12351227 }
12361228
12371229 // if password is generated then the email user button should be clicked
1238- if (
1239- isset ($ values ['NA_Password ' ])
1230+ if (isset ($ values ['NA_Password ' ])
12401231 && $ values ['NA_Password ' ] == "on "
12411232 && $ values ['SendEmail ' ] != "on "
12421233 ) {
@@ -1245,17 +1236,15 @@ class Edit_User extends \NDB_Form
12451236 . 'please notify the user by checking Send email to user box ' ;
12461237 }
12471238
1248- if (
1249- isset ($ values ['NA_Password ' ])
1239+ if (isset ($ values ['NA_Password ' ])
12501240 && $ values ['NA_Password ' ] == 'on '
12511241 && $ plaintext != ''
12521242 ) {
12531243 $ errors ['Password ' ] = 'You must leave the password field empty '
12541244 . 'if you want the system to generate one for you ' ;
12551245 }
12561246
1257- if (
1258- is_null ($ this ->identifier )
1247+ if (is_null ($ this ->identifier )
12591248 && (!isset ($ values ['NA_Password ' ]) || $ values ['NA_Password ' ] != 'on ' )
12601249 && empty ($ plaintext )
12611250 ) {
@@ -1311,8 +1300,7 @@ class Edit_User extends \NDB_Form
13111300 "Please specify if examiner is a radiologist "
13121301 );
13131302 }
1314- if (
1315- $ values ['examiner_radiologist ' ] !== ''
1303+ if ($ values ['examiner_radiologist ' ] !== ''
13161304 && $ values ['examiner_pending ' ] == ''
13171305 ) {
13181306 $ errors ['examiner_group ' ] = dgettext (
@@ -1322,8 +1310,7 @@ class Edit_User extends \NDB_Form
13221310 }
13231311 }
13241312 }
1325- if (
1326- !$ matched
1313+ if (!$ matched
13271314 && ($ values ['examiner_radiologist ' ] !== ''
13281315 || $ values ['examiner_pending ' ] ?? '' !== '' )
13291316 ) {
@@ -1343,8 +1330,7 @@ class Edit_User extends \NDB_Form
13431330 // should be less or equal to the time to it will be active.
13441331 //======================================
13451332
1346- if (
1347- ($ values ['active_to ' ] != null )
1333+ if (($ values ['active_to ' ] != null )
13481334 && ($ values ['active_from ' ] > $ values ['active_to ' ])
13491335 ) {
13501336 $ errors ['active_timeWindows ' ]
0 commit comments