Zanthor
Member
Let me preface this with I'm not a coder by trade but i can muck about and generally get done what needs done. I'm working on an addon that I can use to run a cron job using this guide.
The purpose of this cron job is to check if a users e-mail exists in an external database, and add the user to a group if they do. I've got it running, and returning 'success' for the users it should be, however the user doesn't seem to get added to the group.
Thanks!
The purpose of this cron job is to check if a users e-mail exists in an external database, and add the user to a group if they do. I've got it running, and returning 'success' for the users it should be, however the user doesn't seem to get added to the group.
Code:
if ($users)
{
foreach ($users as $user)
{
// leaving out my validation code.
// addUserGroupChange($userId, $key, $addGroups)
$userModel->addUserGroupChange($userId, 'xiLicenseValidationValidated', XenForo_Application::get('options')->imcCurrentMemberGroup);
}
}
Thanks!
Last edited: