3 years ago
0
Topic

Hi

From https://www.seblod.com/resources/manuals/developer/manipulating-content-joomla-user

I try to set the user group when I dynamically create the user :

$content = new JCckContentUser;
$data = array(
'email'=>'user-01@domain.com',
'first_name'=>'First Name 01',
'last_name'=>'Last Name 01',
'name'=>'Full Name 01',
'username'=>'user-01',

'groups'=>'11'
);

if ( $content->create( $content_type, $data )->isSuccessful() ) {
// Do something
}

But the user group is not set

I also tried

$cuser->setProperty( groups', 11' )
->store();

But it didn't work either

Thanks for your help

Get a VIP membership