I created this usergroup badge which gives usergroups in #18 a badge
$badgeAction = 'dgold_group';
if (in_array(18, $user_info['groups']) && !in_array($badgeAction,$currentBadges))
{
$badgeID = GetBadgeIDByAction($badgeAction);
$ret = AddBadgeToMember($memberID,$badgeID,false);
if ($ret == true)
{
$currentBadges[] = $badgeAction;
$newBadges[] = $badgeAction;
}
}
Problem is, it only sends a pm to the person when they either finish making a post or make a change to their profile.
How do I get the software to check if changes have been made as soon as the person logs into the forum? Or, as soon as they see the index of the forum.
Does it have something to do with this being placed somewhere?
// Badge Awards
global $sourcedir, $modSettings;
if (!empty($modSettings['badgeawards_enable']))
{
global $sourcedir, $user_info;
require_once($sourcedir . '/badgeawards.php');
Badges_CheckMember($memID);
}
// End Badge Awards