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.

Validating Users from external Website

edited July 2009 in Vanilla 1.0 Help
Hi I’m trying to create/validate user from my website using the same database from vanilla, I’m using this scripts that works great!

function CrearUsuario($email,$username,$pw,$BaseVanilla){

include($BaseVanilla."appg/settings.php");
$Configuration['SELF_URL'] = 'urlpage.php';
include($BaseVanilla."appg/init_vanilla.php");

$Applicant = $Context->ObjectFactory->NewContextObject($Context, 'User');

$Applicant->Name = $username;
$Applicant->Email = $email;
$Applicant->NewPassword = $pw;
$Applicant->ConfirmPassword = $pw;
$Applicant->AgreeToTerms = true;

$UserManager = $Context->ObjectFactory->NewContextObject($Context, 'UserManager');

$UserManager->CreateUser($Applicant);

}

function ValidarUsuario($Username, $Password, $PersistentSession, $BaseVanilla){
include_once($BaseVanilla."appg/settings.php");
include_once($BaseVanilla."appg/init_people.php");

return $Context->Authenticator->Authenticate($Username, $Password, $PersistentSession);

}
function DeconectarUsuario($BaseVanilla)
{
include_once($BaseVanilla."appg/settings.php");
include_once($BaseVanilla."appg/init_people.php");

return $Context->Authenticator->DeAuthenticate();
}

But I have some issues

How I can control the user was created? It’s possible to authorize the user at creation?

If I got the extension MembersList activated the script give me this Warnings

Warning: include(extensions/MembersList/conf/language.php) [function.include]: failed to open stream: No such file or directory in E:\xampp\htdocs\vanilla\extensions\MembersList\default.php on line 36

Warning: include() [function.include]: Failed opening 'extensions/MembersList/conf/language.php' for inclusion (include_path='.;E:\xampp\php\pear\') in E:\xampp\htdocs\vanilla\extensions\MembersList\default.php on line 36

Warning: include(extensions/MembersList/conf/settings.php) [function.include]: failed to open stream: No such file or directory in E:\xampp\htdocs\vanilla\extensions\MembersList\default.php on line 37

Warning: include() [function.include]: Failed opening 'extensions/MembersList/conf/settings.php' for inclusion (include_path='.;E:\xampp\php\pear\') in E:\xampp\htdocs\vanilla\extensions\MembersList\default.php on line 37



Thanks for advance!!
Sign In or Register to comment.