Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
User Creation Example?
I'm starting a Vanilla installation for a userbase that is drawn from an application other than a browser. I can use HTTP GET to communicate to the webserver and create users, and that way I can ensure they're users of the other app. Anyone have a chunk of code that shows how to use UserManager to create users? Just a rough framework would even help. :)
TY,
K.
0
This discussion has been closed.
Comments
people.php?PostBackAction=Apply&Email=' . $Email . '&Name=' . $UserName . '&NewPassword=' . $Pw . '&ConfirmPassword=' . $Pw;
The actual script can use the POST or GET array. It try to get a value in the GET array, and if it doesn't find there it look for it in the POST array.
include("appg/settings.php"); $Configuration['SELF_URL'] = 'urlpage.php'; include("appg/init_vanilla.php"); ... $Applicant = $Context->ObjectFactory->NewContextObject($Context, 'User'); $Applicant->Name = $username; $Applicant->Email = $email; $Applicant->NewPassword = $pw; $Applicant->ConfirmPassword = $pw; (EDIT: forgot this one... $Applicant->AgreeToTerms = true;) $UserManager = $Context->ObjectFactory->NewContextObject($Context, 'UserManager'); $UserManager->CreateUser($Applicant);
include("appg/settings.php"); $Configuration['SELF_URL'] = '3rdwave.php'; include("appg/init_people.php"); $Applicant = $Context->ObjectFactory->NewContextObject($Context, 'User'); $Applicant->Name = "testuser"; $Applicant->Email = "testuyser@mynewhost.com"; $Applicant->NewPassword = "newpassword"; $Applicant->ConfirmPassword = "newpassword"; //$Applicant->Discovery = "uuid"; $UserManager = $Context->ObjectFactory->NewContextObject($Context, 'UserManager'); $UserManager->CreateUser($Applicant);
$Context->WarningCollector->Write();
$Applicant->AgreeToTerms = true;
people.php?PostBackAction=Apply&Email=' . $Email . '&Name=' . $UserName . '&NewPassword=' . $Pw . '&ConfirmPassword=' . $Pw&AgreeToTerms=1;
I've just posted a change password example here... http://lussumo.com/community/discussion/3340/
and I think you're already aware it has the login and logout examples there too.