Updating an account password via Web Service API?

Updating an account password via Web Service API?

by Kevin Robinson -
Number of replies: 4

Hi,

I have a website with a login that is already integrated with a database system that needs to be the master system.

i.e. my database needs to be the holder of the most upto date user details and password.

My client wants me to integrate with a Moodle site and I need to be able to automatically sign the user into Moodle when they sign in to my web site.

Any time the user updates any of their account details including their password via my web site i need to update the account details and password in Moodle to match.

Is there an API that can be used to update a user password ?

Any help would be appreciated.


Average of ratings: -
In reply to Kevin Robinson

Re: Updating an account password via Web Service API?

by Dorel Manolescu -
Picture of Plugin developers

Hi

From the web-services documentation under yoursite/admin/webservice/documentation.php

Check:

core_user_update_users 

Parameters:

list of ( 
object {
id int //ID of the user
username string Optional //Username policy is defined in Moodle security config.
password string Optional //Plain text password consisting of any characters
firstname string Optional //The first name(s) of the user
Regards


In reply to Dorel Manolescu

Re: Updating an account password via Web Service API?

by Kevin Robinson -

Hi,

Thank you very much for your reply.

Does Moodle have a developer sandbox area that i can test web methods or do i need to install Moodle ?


In reply to Kevin Robinson

Re: Updating an account password via Web Service API?

by Olumuyiwa Taiwo -
Picture of Plugin developers

> I need to be able to automatically sign the user into Moodle when they sign in to my web site.

Perhaps what you really need is a Moodle auth plugin that does SSO with the main system?