XF 2.2 setting user secondary groups

RisteDimitrievski

Active member
InvalidArgumentException: Attempted to convert integer to comma-separated list [secondary_group_ids] in src\XF\Mvc\Entity\Entity.php at line 759

PHP:
$group = $this->filter('group','int');
$em = $this->em()->find('myaddon:entity',$userid);
if($action == "add"){
    $em->secondary_group_ids = $group;
    $em->save();
}
Anybody?
 
Back
Top Bottom