backend_profile

Allows adding custom content to user profile page.

Team

Input (passed by reference)

$params['contact_id'] int User contact ID.
$params['contact'] waUser User class instance.
… your plugin code …

Output

{$backend_profile.%plugin_id%.before_header}
Custom content above the user name.
{$backend_profile.%plugin_id%.header}
Custom content next to the user name.
{$backend_profile.%plugin_id%.after_header}
Custom content below the user name.
{$backend_profile.%plugin_id%.before_top}
Custom content above the contact data block.
{$backend_profile.%plugin_id%.after_top}
Custom content below the contact data block.
{$backend_profile.%plugin_id%.photo}
Custom content below the photo.
{$backend_profile.%plugin_id%}
{$backend_profile.%plugin_id%.header_links_li}
Team

Plugin code example

PHP

public function backendProfile($params)
{
    $user_id = $params['user_id'];
    $user = $params['user'];
    
    return [
        'photo' => '<div>Custom content below photo</div>',
        'before_header' => '<div>Custom content above user name</div>',
        'header' => '<span>Custom content in the line with user name</span>',
        'after_header' => '<div>Custom content below user name</div>',
        'before_top' => '<div>Custom content above contact data</div>',
        'after_top' => '<div>Custom content below contact data</div>',
    ];
}