File tree Expand file tree Collapse file tree 1 file changed +23
-24
lines changed
Expand file tree Collapse file tree 1 file changed +23
-24
lines changed Original file line number Diff line number Diff line change @@ -139,31 +139,30 @@ function loadFormDef($file) {
139139
140140 //* Load the user profile
141141 function loadUserProfile ($ client_id = 0 ) {
142- global $ app ,$ conf ;
143-
144- $ client_id = intval ($ client_id );
145-
146- if ($ client_id == 0 ) {
147- $ this ->sys_username = 'admin ' ;
148- $ this ->sys_userid = 1 ;
149- $ this ->sys_default_group = 1 ;
150- $ this ->sys_groups = 1 ;
151- } else {
152- //* load system user
153- $ user = $ app ->db ->queryOneRecord ("SELECT * FROM sys_user WHERE sysuser_id = $ client_id " );
154- if (empty ($ user ["userid " ])) {
155- $ this ->errorMessage .= 'No sysuser with the ID $client_id found. ' ;
156- return false ;
157- }
158- $ this ->sys_username = $ user ['username ' ];
159- $ this ->sys_userid = $ user ['userid ' ];
160- $ this ->sys_default_group = $ user ['default_group ' ];
161- $ this ->sys_groups = $ user ['groups ' ];
162- }
163-
164- return true ;
142+ global $ app ,$ conf ;
143+
144+ $ client_id = intval ($ client_id );
165145
166- }
146+ if ($ client_id == 0 ) {
147+ $ this ->sys_username = 'admin ' ;
148+ $ this ->sys_userid = 1 ;
149+ $ this ->sys_default_group = 1 ;
150+ $ this ->sys_groups = 1 ;
151+ } else {
152+ //* load system user
153+ $ user = $ app ->db ->queryOneRecord ("SELECT * FROM sys_user WHERE sysuser_id = $ client_id " );
154+ if (empty ($ user ["userid " ])) {
155+ $ this ->errorMessage .= 'No sysuser with the ID $client_id found. ' ;
156+ return false ;
157+ }
158+ $ this ->sys_username = $ user ['username ' ];
159+ $ this ->sys_userid = $ user ['userid ' ];
160+ $ this ->sys_default_group = $ user ['default_group ' ];
161+ $ this ->sys_groups = $ user ['groups ' ];
162+ }
163+
164+ return true ;
165+ }
167166
168167
169168 /**
You can’t perform that action at this time.
0 commit comments