Why is the argument to core_user_create_users different from the result of core_user_get_users_by_id?

Why is the argument to core_user_create_users different from the result of core_user_get_users_by_id?

by Jocelyn Ireson-Paine -
Number of replies: 1

I'm on Moodle 2.2, looking at the Web-service documentation at 'Site administration > Plugins > Web services > API Documentation'. It says that the argument to 'core_user_create_users' is an object with fields such as 'username', 'password', and 'firstname'. So is the result returned by 'core_user_get_users_by_id'. But there are odd differences. 

For example, the parameter can contain an email address, but not a Skype ID, Yahoo ID, or MSN number. The result can contain all of these. So you can get these fields, but not set them.

Also, the parameter has this field:

description           string  // Optional 
                              // User profile description, no HTML

But the result has these fields:

description           string  // Optional 
                              // User profile description
descriptionformat     int     // Optional 
                              // User profile description  format

So it looks as though there's a flag to describe a profile's format — but you can't set that format!

Jocelyn

Average of ratings: -
In reply to Jocelyn Ireson-Paine

Re: Why is the argument to core_user_create_users different from the result of core_user_get_users_by_id?

by Jérôme Mouneyrac -

I like your drawings Jocelyn smile

Can you tracker write an issue for these missing fields in create users?

Cheers, Jerome.