Programmatically register a user1 user found helpful
$userData['uName'] = 'username'; $userData['uEmail'] = 'mailaddress'; $userData['uPassword'] = 'password'; $userData['uPasswordConfirm'] = 'password'; $ui = UserInfo::register($userData); // assign the new user to a group $g = Group::getByName('Administrators'); $u = $ui->getUserObject(); $u->enterGroup($g);
$userData['uGroups'] = ['registered','premium'] // ?
Sorry to take this post to my own question.
My problem is that's code don't works outside concrete5, or well I don't know to use it.
In my case, I have a php program to add a new user to another system, and I need to add this same user to the concrete5 system to have in both the same user, and when the user do login in my concrete5 site, he can to use my app's in the other system, that I have to include in my concrete5 with a addon iframe type.
I don't know if I can explain my case clearly?
Thanks for patient!