Skip to:
Content
Pages
Categories
Search
Top
Bottom

User Avatar Hook

  • @rigidsphp6

    Member

    I want to add a certain function in theme function.php or bp-custom.php so that functions hooks into avatar hook(everywhere user avatar is displayed) and check whether a variable in database is 0 or 1
    if it is one the image specified in database corresponding to that user should be displayed as avatar else the one user uploaded.
    Something like

    if($dbvar==1)
    {
    //Display the image specified by administrator as avatar
    }
    else{
    //display image as per user as avatar
    }
    If this cannot be done using hooks or functions.php can you list any other way of doing this? The use of hook is required to make it universal meaning in activity and user friends and all other place avatar is displayed

Viewing 1 replies (of 1 total)
  • @djpaul

    Keymaster

    Take a look at BP’s bp_core_fetch_avatar_filter() function.

Viewing 1 replies (of 1 total)
  • The topic ‘User Avatar Hook’ is closed to new replies.
Skip to toolbar