Completed
Pull Request — 1.11.x (#1262)
by José
41:21
created
main/webservices/test.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@  discard block
 block discarded – undo
15 15
 $script = isset($_POST['script']) ? $_POST['script'] : false;
16 16
 $function = isset($_POST['function']) ? $_POST['function'] : false;
17 17
 
18
-$contact= $server.$script.'?wsdl';
18
+$contact = $server.$script.'?wsdl';
19 19
 
20 20
 $client = new nusoap_client($contact);
21 21
 $err = $client->getError();
22 22
 if ($err) {
23 23
     // Display the error
24
-    echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
24
+    echo '<h2>Constructor error</h2><pre>'.$err.'</pre>';
25 25
     // At this point, you know the call that follows will fail
26 26
 }
27 27
 $response = array();
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 $list = scandir($serversys);
38 38
 $scripts = array();
39 39
 foreach ($list as $item) {
40
-    if (substr($item,0,1) == '.') { continue; }
41
-    if (substr($item,-8)=='soap.php') {
40
+    if (substr($item, 0, 1) == '.') { continue; }
41
+    if (substr($item, -8) == 'soap.php') {
42 42
         $scripts[] = $item;
43 43
     }
44 44
 }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 ?>
56 56
 </select><br />
57 57
 <label for="function">Function</label>
58
-<input type="text" name="function" value="<?php echo $function;?>"></input><br />
58
+<input type="text" name="function" value="<?php echo $function; ?>"></input><br />
59 59
 <label for="param[0]">Param 0</label>
60 60
 <input type="text" name="param[0]" ></input><br />
61 61
 <input type="submit" name="submit" value="Send"/>
Please login to merge, or discard this patch.
main/webservices/courses_list.soap.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
         'all',
29 29
         '',
30 30
         array(
31
-          'name'=>'code'  , 'type'=>'xsd:string',
32
-          'name'=>'title'  , 'type'=>'xsd:string',
33
-          'name'=>'url'    , 'type'=>'xsd:string',
31
+          'name'=>'code', 'type'=>'xsd:string',
32
+          'name'=>'title', 'type'=>'xsd:string',
33
+          'name'=>'url', 'type'=>'xsd:string',
34 34
           'name'=>'teacher', 'type'=>'xsd:string',
35
-          'name'=>'language','type'=>'xsd:string',
35
+          'name'=>'language', 'type'=>'xsd:string',
36 36
         )
37 37
 );
38 38
 
@@ -51,15 +51,15 @@  discard block
 block discarded – undo
51 51
 );
52 52
 
53 53
 // Register the method to expose
54
-$server->register('WSCourseList',         // method name
54
+$server->register('WSCourseList', // method name
55 55
     array('username' => 'xsd:string',
56 56
           'signature' => 'xsd:string',
57
-          'visibilities' => 'xsd:string'),      // input parameters
58
-    array('return' => 'xsd:Array'),             // output parameters
59
-    'urn:WSCourseList',                         // namespace
60
-    'urn:WSCourseList#WSCourseList',      // soapaction
61
-    'rpc',                                      // style
62
-    'encoded',                                  // use
57
+          'visibilities' => 'xsd:string'), // input parameters
58
+    array('return' => 'xsd:Array'), // output parameters
59
+    'urn:WSCourseList', // namespace
60
+    'urn:WSCourseList#WSCourseList', // soapaction
61
+    'rpc', // style
62
+    'encoded', // use
63 63
     'This service returns a list of courses'    // documentation
64 64
 );
65 65
 
Please login to merge, or discard this patch.
main/webservices/user_import/service.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,5 +59,5 @@
 block discarded – undo
59 59
 
60 60
 $server->register('import_users_from_file');
61 61
 
62
-$http_request = (isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:'');
62
+$http_request = (isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '');
63 63
 $server->service($http_request);
Please login to merge, or discard this patch.
main/webservices/user_import/import.lib.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,12 +4,12 @@  discard block
 block discarded – undo
4 4
  */
5 5
 function validate_data($users) {
6 6
 	global $defined_auth_sources;
7
-	$errors = array ();
8
-	$usernames = array ();
9
-	if(is_array($users)) {
7
+	$errors = array();
8
+	$usernames = array();
9
+	if (is_array($users)) {
10 10
 		foreach ($users as $index => $user) {
11 11
 			// 1. Check whether mandatory fields have been set.
12
-			$mandatory_fields = array ('LastName', 'FirstName');
12
+			$mandatory_fields = array('LastName', 'FirstName');
13 13
 			if (api_get_setting('registration', 'email') == 'true') {
14 14
 				$mandatory_fields[] = 'Email';
15 15
 			}
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
  */
91 91
 function save_data($users) {
92 92
 	$user_table = Database :: get_main_table(TABLE_MAIN_USER);
93
-	if(is_array($users)) {
93
+	if (is_array($users)) {
94 94
 		foreach ($users as $index => $user) {
95 95
 			$user = complete_missing_data($user);
96 96
 
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 
99 99
 			$user_id = UserManager :: create_user($user['FirstName'], $user['LastName'], $user['Status'], $user['Email'], $user['UserName'], $user['Password'], $user['OfficialCode'], api_get_setting('PlatformLanguage'), $user['PhoneNumber'], '', $user['AuthSource']);
100 100
 			foreach ($user['Courses'] as $index => $course) {
101
-				if(CourseManager :: course_exists($course))
102
-					CourseManager :: subscribe_user($user_id, $course,$user['Status']);
101
+				if (CourseManager :: course_exists($course))
102
+					CourseManager :: subscribe_user($user_id, $course, $user['Status']);
103 103
 			}
104 104
 			if (strlen($user['ClassName']) > 0) {
105 105
 				$class_id = ClassManager :: get_class_id($user['ClassName']);
Please login to merge, or discard this patch.
main/webservices/cm_webservice_announcements.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
     public function get_announcements_id($username, $password, $course_code)
17 17
     {
18
-        if($this->verifyUserPass($username, $password) == "valid")
18
+        if ($this->verifyUserPass($username, $password) == "valid")
19 19
         {
20 20
 
21 21
             $result = self::get_announcements($username, $course_code);
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
 
34 34
     public function get_announcement_data($username, $password, $course_code, $announcement_id, $field)
35 35
     {
36
-        if($this->verifyUserPass($username, $password) == "valid")
36
+        if ($this->verifyUserPass($username, $password) == "valid")
37 37
         {
38 38
             $htmlcode = false;
39 39
             $user_id = UserManager::get_user_id_from_username($username);
40 40
 
41 41
             $result = self::get_announcements($username, $course_code, $announcement_id);
42
-            while($announcement = Database::fetch_array($result))
42
+            while ($announcement = Database::fetch_array($result))
43 43
             {
44 44
                 $announcements[] = $announcement;
45 45
             }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
             return (htmlcode) ? html_entity_decode($announcements[0][$field_table]) : $announcements[0][$field_table];
71 71
 
72
-        }else
72
+        } else
73 73
             return get_lang('InvalidId');
74 74
     }
75 75
 
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
         $announcement_id = ($announcement_id == 0) ? "" : "AND announcement.id=".$announcement_id;
83 83
         $user_id = UserManager::get_user_id_from_username($username);
84 84
         $course_info = CourseManager::get_course_information($course_code);
85
-        $tbl_item_property  	= Database::get_course_table(TABLE_ITEM_PROPERTY);
86
-        $tbl_announcement		= Database::get_course_table(TABLE_ANNOUNCEMENT);
87
-        $maximum 	= '12';
85
+        $tbl_item_property = Database::get_course_table(TABLE_ITEM_PROPERTY);
86
+        $tbl_announcement = Database::get_course_table(TABLE_ANNOUNCEMENT);
87
+        $maximum = '12';
88 88
 
89
-        $group_memberships=GroupManager::get_group_ids($course_info['real_id'], $user_id);
89
+        $group_memberships = GroupManager::get_group_ids($course_info['real_id'], $user_id);
90 90
 
91 91
         if (api_get_group_id() == 0) {
92 92
             $cond_user_id = " AND (
@@ -104,8 +104,8 @@  discard block
 block discarded – undo
104 104
 
105 105
         // the user is member of several groups => display personal
106 106
         // announcements AND his group announcements AND the general announcements
107
-        if (is_array($group_memberships) && count($group_memberships)>0) {
108
-            $sql="SELECT
107
+        if (is_array($group_memberships) && count($group_memberships) > 0) {
108
+            $sql = "SELECT
109 109
                     announcement.*, ip.visibility, ip.to_group_id, ip.insert_user_id
110 110
                 FROM $tbl_announcement announcement, $tbl_item_property ip
111 111
                 WHERE
Please login to merge, or discard this patch.
main/webservices/soap_course.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,10 +51,10 @@
 block discarded – undo
51 51
 	'WSCourse.DeleteCourse',
52 52
 	array('secret_key' => 'xsd:string', 'course_id_field_name' => 'xsd:string', 'course_id_value' => 'xsd:string'),
53 53
 	array(),
54
-    'urn:WSService',                               // namespace
55
-    'urn:WSService#WSCourse.DeleteCourse',         // soapaction
56
-    'rpc',                                         // style
57
-    'encoded',                                     // use
54
+    'urn:WSService', // namespace
55
+    'urn:WSService#WSCourse.DeleteCourse', // soapaction
56
+    'rpc', // style
57
+    'encoded', // use
58 58
     'Delete a course in chamilo'                   // documentation
59 59
 
60 60
 );
Please login to merge, or discard this patch.
main/webservices/courses_list.rest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@
 block discarded – undo
60 60
 	$courses_list = courses_list($_POST['security-key'], $_POST['visibility']);
61 61
 	foreach ($courses_list as $code => $cd) {
62 62
 		echo '<course>';
63
-		echo '<code>' , $code , '</code>';
64
-		echo '<title>' , $cd['title'] , '</title>';
65
-		echo '<url>' , $cd['url'] , '</url>';
66
-		echo '<teacher>' , $cd['teacher'] , '</teacher>';
67
-		echo '<language>' , $cd['language'] , '</language>';
63
+		echo '<code>', $code, '</code>';
64
+		echo '<title>', $cd['title'], '</title>';
65
+		echo '<url>', $cd['url'], '</url>';
66
+		echo '<teacher>', $cd['teacher'], '</teacher>';
67
+		echo '<language>', $cd['language'], '</language>';
68 68
 		echo '</course>';
69 69
 	}
70 70
 }
Please login to merge, or discard this patch.
main/webservices/cm_soap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 	 * Singleton method
41 41
 	 */
42 42
 	public static function singleton() {
43
-		if(!isset(self::$_instance)) {
43
+		if (!isset(self::$_instance)) {
44 44
 			self::$_instance = new soap_server();
45 45
 			// Set the error handler
46 46
 			WSCMError::setErrorHandler(new WSCMSoapErrorHandler());
Please login to merge, or discard this patch.
main/webservices/webservice_user.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
20 20
 	 */
21 21
 	protected function changeUserActiveState($user_id_field_name, $user_id_value, $state) {
22 22
 		$user_id = $this->getUserId($user_id_field_name, $user_id_value);
23
-		if($user_id instanceof WSError) {
23
+		if ($user_id instanceof WSError) {
24 24
 			return $user_id;
25 25
 		} else {
26
-			if($state == 0) {
26
+			if ($state == 0) {
27 27
 				UserManager::disable($user_id);
28
-			} else if($state == 1) {
28
+			} else if ($state == 1) {
29 29
 				UserManager::enable($user_id);
30 30
 			}
31 31
 		}
@@ -40,11 +40,11 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	protected function changeUsersActiveState($users, $state) {
42 42
 		$results = array();
43
-		foreach($users as $user) {
43
+		foreach ($users as $user) {
44 44
 			$result_tmp = array();
45 45
 			$result_op = $this->changeUserActiveState($user['user_id_field_name'], $user['user_id_value'], $state);
46 46
 			$result_tmp['user_id_value'] = $user['user_id_value'];
47
-			if($result_op instanceof WSError) {
47
+			if ($result_op instanceof WSError) {
48 48
 				// Return the error in the results
49 49
 				$result_tmp['result'] = $result_op->toArray();
50 50
 			} else {
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
 	 */
65 65
 	public function DisableUser($secret_key, $user_id_field_name, $user_id_value) {
66 66
 		$verifKey = $this->verifyKey($secret_key);
67
-		if($verifKey instanceof WSError) {
67
+		if ($verifKey instanceof WSError) {
68 68
 			// Let the implementation handle it
69 69
 			$this->handleError($verifKey);
70 70
 		} else {
71 71
 			$result = $this->changeUserActiveState($user_id_field_name, $user_id_value, 0);
72
-			if($result instanceof WSError) {
72
+			if ($result instanceof WSError) {
73 73
 				$this->handleError($result);
74 74
 			}
75 75
 		}
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 */
86 86
 	public function DisableUsers($secret_key, $users) {
87 87
 		$verifKey = $this->verifyKey($secret_key);
88
-		if($verifKey instanceof WSError) {
88
+		if ($verifKey instanceof WSError) {
89 89
 			// Let the implementation handle it
90 90
 			$this->handleError($verifKey);
91 91
 		} else {
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
 	 */
103 103
 	public function EnableUser($secret_key, $user_id_field_name, $user_id_value) {
104 104
 		$verifKey = $this->verifyKey($secret_key);
105
-		if($verifKey instanceof WSError) {
105
+		if ($verifKey instanceof WSError) {
106 106
 			$this->handleError($verifKey);
107 107
 		} else {
108 108
 			$result = $this->changeUserActiveState($user_id_field_name, $user_id_value, 1);
109
-			if($result instanceof WSError) {
109
+			if ($result instanceof WSError) {
110 110
 				$this->handleError($result);
111 111
 			}
112 112
 		}
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 */
123 123
 	public function EnableUsers($secret_key, $users) {
124 124
 		$verifKey = $this->verifyKey($secret_key);
125
-		if($verifKey instanceof WSError) {
125
+		if ($verifKey instanceof WSError) {
126 126
 			// Let the implementation handle it
127 127
 			$this->handleError($verifKey);
128 128
 		} else {
@@ -139,10 +139,10 @@  discard block
 block discarded – undo
139 139
 	 */
140 140
 	protected function deleteUserHelper($user_id_field_name, $user_id_value) {
141 141
 		$user_id = $this->getUserId($user_id_field_name, $user_id_value);
142
-		if($user_id instanceof WSError) {
142
+		if ($user_id instanceof WSError) {
143 143
 			return $user_id;
144 144
 		} else {
145
-			if(!UserManager::delete_user($user_id)) {
145
+			if (!UserManager::delete_user($user_id)) {
146 146
 				return new WSError(101, "There was a problem while deleting this user");
147 147
 			} else {
148 148
 				return true;
@@ -159,11 +159,11 @@  discard block
 block discarded – undo
159 159
 	 */
160 160
 	public function DeleteUser($secret_key, $user_id_field_name, $user_id_value) {
161 161
 		$verifKey = $this->verifyKey($secret_key);
162
-		if($verifKey instanceof WSError) {
162
+		if ($verifKey instanceof WSError) {
163 163
 			$this->handleError($verifKey);
164 164
 		} else {
165 165
 			$result = $this->deleteUserHelper($user_id_field_name, $user_id_value);
166
-			if($result instanceof WSError) {
166
+			if ($result instanceof WSError) {
167 167
 				$this->handleError($result);
168 168
 			}
169 169
 		}
@@ -179,15 +179,15 @@  discard block
 block discarded – undo
179 179
 	 */
180 180
 	public function DeleteUsers($secret_key, $users) {
181 181
 		$verifKey = $this->verifyKey($secret_key);
182
-		if($verifKey instanceof WSError) {
182
+		if ($verifKey instanceof WSError) {
183 183
 			$this->handleError($verifKey);
184 184
 		} else {
185 185
 			$results = array();
186
-			foreach($users as $user) {
186
+			foreach ($users as $user) {
187 187
 				$result_tmp = array();
188 188
 				$result_op = $this->deleteUserHelper($user['user_id_field_name'], $user['user_id_value']);
189 189
 				$result_tmp['user_id_value'] = $user['user_id_value'];
190
-				if($result_op instanceof WSError) {
190
+				if ($result_op instanceof WSError) {
191 191
 					// Return the error in the results
192 192
 					$result_tmp['result'] = $result_op->toArray();
193 193
 				} else {
@@ -223,20 +223,20 @@  discard block
 block discarded – undo
223 223
         global $api_failureList;
224 224
 		// Add the original user id field name and value to the extra fields if needed
225 225
 		$extras_associative = array();
226
-		if($user_id_field_name != "chamilo_user_id") {
226
+		if ($user_id_field_name != "chamilo_user_id") {
227 227
 			$extras_associative[$user_id_field_name] = $user_id_value;
228 228
 		}
229 229
                 if (!empty($extras)) {
230
-                    foreach($extras as $extra) {
230
+                    foreach ($extras as $extra) {
231 231
                         $extras_associative[$extra['field_name']] = $extra['field_value'];
232 232
                     }
233 233
                 }
234 234
 		$result = UserManager::create_user($firstname, $lastname, $status, $email, $login, $password, '', $language, $phone, '', PLATFORM_AUTH_SOURCE, $expiration_date, $visibility, 0, $extras_associative, $encrypt_method);
235 235
 		if (!$result) {
236 236
 			$failure = $api_failureList[0];
237
-			if($failure == 'login-pass already taken') {
237
+			if ($failure == 'login-pass already taken') {
238 238
 				return new WSError(102, 'This username is already taken');
239
-			} else if($failure == 'encrypt_method invalid') {
239
+			} else if ($failure == 'encrypt_method invalid') {
240 240
 				return new WSError(103, 'The encryption of the password is invalid');
241 241
 			} else {
242 242
 				return new WSError(104, 'There was an error creating the user');
@@ -270,11 +270,11 @@  discard block
 block discarded – undo
270 270
 	public function CreateUser($secret_key, $firstname, $lastname, $status, $login, $password, $encrypt_method, $user_id_field_name, $user_id_value, $visibility = 1, $email = '', $language = 'english', $phone = '', $expiration_date = '0000-00-00 00:00:00', $extras = array()) {
271 271
 		// First, verify the secret key
272 272
 		$verifKey = $this->verifyKey($secret_key);
273
-		if($verifKey instanceof WSError) {
273
+		if ($verifKey instanceof WSError) {
274 274
 			$this->handleError($verifKey);
275 275
 		} else {
276 276
 			$result = $this->createUserHelper($firstname, $lastname, $status, $login, $password, $encrypt_method, $user_id_field_name, $user_id_value, $visibility, $email, $language, $phone, $expiration_date, $extras);
277
-			if($result instanceof WSError) {
277
+			if ($result instanceof WSError) {
278 278
 				$this->handleError($result);
279 279
 			} else {
280 280
 				return $result;
@@ -291,17 +291,17 @@  discard block
 block discarded – undo
291 291
 	 */
292 292
 	public function CreateUsers($secret_key, $users) {
293 293
 		$verifKey = $this->verifyKey($secret_key);
294
-		if($verifKey instanceof WSError) {
294
+		if ($verifKey instanceof WSError) {
295 295
 			$this->handleError($verifKey);
296 296
 		} else {
297 297
 			$results = array();
298
-			foreach($users as $user) {
298
+			foreach ($users as $user) {
299 299
 				$result_tmp = array();
300 300
                 // re-initialize variables just in case
301 301
                 $firstname = $lastname = $status = $login = $password = $encrypt_method = $user_id_field_name = $user_id_value = $visibility = $email = $language = $phone = $expiration_date = $extras = null;
302 302
 				extract($user);
303 303
 				$result = $this->createUserHelper($firstname, $lastname, $status, $login, $password, $encrypt_method, $user_id_field_name, $user_id_value, $visibility, $email, $language, $phone, $expiration_date, $extras);
304
-				if($result instanceof WSError) {
304
+				if ($result instanceof WSError) {
305 305
 					$result_tmp['result'] = $result->toArray();
306 306
 					$result_tmp['user_id_value'] = $user_id_value;
307 307
 					$result_tmp['user_id_generated'] = 0;
@@ -351,10 +351,10 @@  discard block
 block discarded – undo
351 351
 	) {
352 352
         global $api_failureList;
353 353
 		$user_id = $this->getUserId($user_id_field_name, $user_id_value);
354
-		if($user_id instanceof WSError) {
354
+		if ($user_id instanceof WSError) {
355 355
 			return $user_id;
356 356
 		} else {
357
-			if($password == '') {
357
+			if ($password == '') {
358 358
 				$password = null;
359 359
 			}
360 360
 			$user_info = api_get_user_info($user_id);
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 			);
384 384
 			if (!$result) {
385 385
 				$failure = $api_failureList[0];
386
-				if($failure == 'encrypt_method invalid') {
386
+				if ($failure == 'encrypt_method invalid') {
387 387
 					return new WSError(103, 'The encryption of the password is invalid');
388 388
 				} else {
389 389
 					return new WSError(105, 'There was an error updating the user');
@@ -415,19 +415,19 @@  discard block
 block discarded – undo
415 415
 	public function EditUser($secret_key, $user_id_field_name, $user_id_value, $firstname, $lastname, $status, $loginname, $password, $encrypt_method, $email, $language, $phone, $expiration_date, $extras) {
416 416
 		// First, verify the secret key
417 417
 		$verifKey = $this->verifyKey($secret_key);
418
-		if($verifKey instanceof WSError) {
418
+		if ($verifKey instanceof WSError) {
419 419
 			$this->handleError($verifKey);
420 420
 		} else {
421 421
 
422 422
 			$extras_associative = array();
423 423
 			if (!empty($extras)) {
424
-				foreach($extras as $extra) {
424
+				foreach ($extras as $extra) {
425 425
 					$extras_associative[$extra['field_name']] = $extra['field_value'];
426 426
 				}
427 427
 			}
428 428
 
429 429
 			$result = $this->editUserHelper($user_id_field_name, $user_id_value, $firstname, $lastname, $status, $loginname, $password, $encrypt_method, $email, $language, $phone, $expiration_date, $extras_associative);
430
-			if($result instanceof WSError) {
430
+			if ($result instanceof WSError) {
431 431
 				$this->handleError($result);
432 432
 			}
433 433
 		}
@@ -443,18 +443,18 @@  discard block
 block discarded – undo
443 443
 	 */
444 444
 	public function EditUsers($secret_key, $users) {
445 445
 		$verifKey = $this->verifyKey($secret_key);
446
-		if($verifKey instanceof WSError) {
446
+		if ($verifKey instanceof WSError) {
447 447
 			$this->handleError($verifKey);
448 448
 		} else {
449 449
 			$results = array();
450
-			foreach($users as $user) {
450
+			foreach ($users as $user) {
451 451
 				$result_tmp = array();
452 452
                 // re-initialize variables just in case
453 453
                 $user_id_field_name = $user_id_value = $firstname = $lastname = $status = $loginname = $password = $encrypt_method = $email = $language = $phone = $expiration_date = $extras = null;
454 454
 				extract($user);
455 455
 				$result_op = $this->editUserHelper($user_id_field_name, $user_id_value, $firstname, $lastname, $status, $loginname, $password, $encrypt_method, $email, $language, $phone, $expiration_date, $extras);
456 456
 				$result_tmp['user_id_value'] = $user['user_id_value'];
457
-				if($result_op instanceof WSError) {
457
+				if ($result_op instanceof WSError) {
458 458
 					// Return the error in the results
459 459
 					$result_tmp['result'] = $result_op->toArray();
460 460
 				} else {
Please login to merge, or discard this patch.