From 7e706a19bf32d02e16916542eaa24e0fc4b41f89 Mon Sep 17 00:00:00 2001 From: Misha Golenkov Date: Fri, 5 Jul 2024 12:05:07 +1000 Subject: [PATCH] Allow auth and password mutation in Update user step --- classes/local/step/update_user_trait.php | 4 ---- lang/en/tool_dataflows.php | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/classes/local/step/update_user_trait.php b/classes/local/step/update_user_trait.php index 7611cf86..7b578fc6 100644 --- a/classes/local/step/update_user_trait.php +++ b/classes/local/step/update_user_trait.php @@ -85,10 +85,6 @@ public function execute($input = null) { (array) $config->fields ); - // Some fields will not be updatable (intentionally). - unset($userobject->password); - unset($userobject->auth); - // Update user fields using core api. \user_update_user($userobject, false, false); \profile_save_data($userobject); diff --git a/lang/en/tool_dataflows.php b/lang/en/tool_dataflows.php index 9060e3a0..0250c24b 100644 --- a/lang/en/tool_dataflows.php +++ b/lang/en/tool_dataflows.php @@ -660,4 +660,4 @@ $string['update_user:userid'] = 'User ID'; $string['update_user:userid_help'] = 'The internal ID for this user.'; $string['update_user:fields'] = 'Fields'; -$string['update_user:fields_help'] = 'Fields set here correspond to the fields available in the underlying user table. Custom user profile fields, must be prefixed with "profile_field_" followed by the shortname. Not all fields can be updated, such as password and auth'; +$string['update_user:fields_help'] = 'Fields set here correspond to the fields available in the underlying user table. Custom user profile fields, must be prefixed with "profile_field_" followed by the shortname';