MyBB Community Forums

Full Version: [solved]Hijacking $groupimage?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It's probably something simple that I'm missing, but I have a plugin, I set the hook to member_profile_start, and I want to change the value of $groupimage. I declare $groupimage =, but it isn't working. What am I missing?
groupimage variable is evaluated in the code AFTER member_profile_start. you need to hook into member_profile_end if you want to replace that variable's contents
You should hook into member_profile_end instead of the member_profile_start. In the start the $groupimage variable isn't created yet.

$plugin->add_hook('member_profile_end', 'MYPLUGIN_member_profile_end');
function MYPLUGIN_member_profile_end()
{
     global $groupimage;
     
     //...
}
It worked, thanks.