$this->modx->runProcessor('security/user/create', array(
..........
'groups' => json_encode(array('user_group'=>'Parents','role'=>'1')),
'newpassword' => TRUE,
'passwordnotifymethod' => 'e',
'passwordgenmethod' => 'g',
'class_key' => 'ParentExtUser',
));
$this->modx->runProcessor('security/user/create', array(
..........
'groups' => json_encode(array('user_group'=>'2','role'=>'1')),
'newpassword' => TRUE,
'passwordnotifymethod' => 'e',
'passwordgenmethod' => 'g',
'class_key' => 'ParentExtUser',
));
$this->modx->runProcessor('security/user/create', array(
..........
'groups' => json_encode(array('user_group'=>2,'role'=>'1')),
'newpassword' => TRUE,
'passwordnotifymethod' => 'e',
'passwordgenmethod' => 'g',
'class_key' => 'ParentExtUser',
));
'groups' =>array('user_group'=>2,'role'=>'1')
/* create user group links */
if (isset($scriptProperties['groups'])) {
$ugms = array();
$groups = $modx->fromJSON($scriptProperties['groups']); /*fromJSON I am assuming is expecting data in json format to then do somthing with it, ie get something from json*/
foreach ($groups as $group) {
$ugm = $modx->newObject('modUserGroupMember');
$ugm->set('user_group',$group['usergroup']);
$ugm->set('role',$group['role']);
$ugms[] = $ugm;
}
$user->addMany($ugms,'UserGroupMembers');
}
'groups' => json_encode(array(array('usergroup'=> '2' ,'role'=>'1'))),
'groups' => json_encode(array(array('usergroup'=> '2' ,'role'=>'1')),array('usergroup'=>'3', 'role'=>'1') ),