I have a web service that creates new users - with the core_user_create_users function. It creates the users, it returns the info as per the docs, with user number etc.
However, I cannot log in as the new user created by the webservice. This is returned in the address bar:
If I then use the "lost password" page - moodle emails the email with the reset password page. After re-inserting the password - it works.
I have checked the password variables to the very last - to this point:
$user1 = new stdClass();
$user1->username = $userName;
$user1->password = $slpWord;
$user1->firstname = $firstName;
$user1->lastname = $familyName;
$user1->email = $email;
$user1->auth = 'manual';
$user1->city = $city;
$user1->country = $country;
All is good, but it (the password) does not work for the newly created user.
Any suggestions very welcome, tim