-
Notifications
You must be signed in to change notification settings - Fork 7
mastodon_api_update_credentials
Alex Kirk edited this page Feb 8, 2025
·
4 revisions
An action for clients to hook into for setting user profile data.
Keys: avatar(attachment_id)|header(attachment_id)|display_name(string)|note(string)|fields_attributes(hash) If your plugin acts on data and you don't want this plugin to runs it own update, remove the keys from the array.
add_filter(
'mastodon_api_update_credentials',
function (
array $data,
int $user_id
) {
// Your code here
return $data;
},
10,
2
);
-
array
$data
User attributes requested to update. Only keys requested for update will be present. -
int
$user_id
The user_id to act on.
apply_filters( 'mastodon_api_update_credentials', $data, $user_id )