I'm using Moodle 3.8.4+. I'm new in moodle and don't know how to update the user fields by code. I would like to develop a script that automatically updates the "ICQ Number" optional field. I've updated the icq field in the mdl_user table but the field doesn't change in the user profile. How is it possible to reflect the changing in the user profile?
" I've updated the icq field in the mdl_user table but the field doesn't change in the user profile. "
Much user data like this is cached. If you updated the field okay in the database, then it will probably not update immediately for the user. You may need to purge caches on the server and/or log out and in as the user to refresh the cache and/or purge the local cache on your browser in order to see the edited fields.
Much user data like this is cached. If you updated the field okay in the database, then it will probably not update immediately for the user. You may need to purge caches on the server and/or log out and in as the user to refresh the cache and/or purge the local cache on your browser in order to see the edited fields.
I've purged all the cache by the Site Administrator section, deleted the cache in my browser and log in as the user, but the "ICQ number" field is still blank
Then I would definitely verify that it was actually changed. A download from Bulk user actions with all the user profile info should show those changes for those users (or not).
I've downloaded the user data from bulk user actions and the icq field is blank
Then the data is not in the database, otherwise it would be in the download file. You should check to make sure the method you used to add the data was working and it was in the right place.
I've fixed, the problem is that the database was been duplicated on another server. I've updated the right database and see the ICR number in the interface.
Alessio,
So, it was working, just not in the place you wanted Glad it is fixed.
So, it was working, just not in the place you wanted Glad it is fixed.