Skip to content

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.

Auto-generated Example

add_filter(
    'mastodon_api_update_credentials',
    function (
        array $data,
        int $user_id
    ) {
        // Your code here
        return $data;
    },
    10,
    2
);

Parameters

  • array $data User attributes requested to update. Only keys requested for update will be present.
  • int $user_id The user_id to act on.

Files

apply_filters( 'mastodon_api_update_credentials', $data, $user_id )

Hooks

Clone this wiki locally