File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -30,4 +30,5 @@ $wb['repeat_password_txt'] = 'Repeat Password';
3030$wb['password_mismatch_txt'] = 'The passwords do not match.';
3131$wb['password_match_txt'] = 'The passwords do match.';
3232$wb['username_error_collision'] = 'The username may not be web or web plus a number."';
33+ $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
3334?>
Original file line number Diff line number Diff line change @@ -66,7 +66,14 @@ function onBeforeUpdate() {
6666 if (@is_array ($ this ->dataRecord ['modules ' ]) && !in_array ($ this ->dataRecord ['startmodule ' ], $ this ->dataRecord ['modules ' ])) {
6767 $ app ->tform ->errorMessage .= $ app ->tform ->wordbook ['startmodule_err ' ];
6868 }
69+
6970 $ this ->oldDataRecord = $ app ->tform ->getDataRecord ($ this ->id );
71+
72+ //* A user that belongs to a client record (client or reseller) may not have typ admin
73+ if (isset ($ this ->dataRecord ['typ ' ]) && $ this ->dataRecord ['typ ' ][0 ] == 'admin ' && $ this ->oldDataRecord ['client_id ' ] > 0 ) {
74+ $ app ->tform ->errorMessage .= $ app ->tform ->wordbook ['client_not_admin_err ' ];
75+ }
76+
7077 }
7178
7279 /*
You can’t perform that action at this time.
0 commit comments