login.ws.php should get user info from username
api_get_user_info() works on userid rather than username At least in login.ws.php the following fixed the issue for me. The same change might be relevant in other files under chamilo-lms-1.10.8/main/auth/
diff -u login.ws.php.000 login.ws.php
--- login.ws.php.000 2016-09-02 13:27:13.303940444 +0100
+++ login.ws.php 2016-09-02 13:28:52.713228101 +0100
@@ -21,7 +21,7 @@
// if the authentication was successful, proceed
if ($isValid === 1) {
//error_log('WS authentication worked');
- $chamiloUser = api_get_user_info($login);
+ $chamiloUser = api_get_user_info_from_username($login);
$loginFailed = false;
$_user['user_id'] = $chamiloUser['user_id'];
$_user['status'] = (isset($chamiloUser['status']) ? $chamiloUser['status'] : 5);
I added the change
Thanks - the commit looks correct to me, and works in the pop3 variation of login.ws.php we happen to use. Let me know if there is any interest in adding our login.pop3.php to chamilo. Should I close this issue or will it be closed by some other way ?
You can close the issue at any time, once you decide it is fixed (if you reported it). We're happy to include the login.pop3.php file in Chamilo if you can send it soon (that would be another issue, though).