Re: autmated login
Posted: Fri Oct 19, 2012 4:42 pm
i also notice that in account property for the new user i don't see there validation code? its blank.



If they login via the built-in interface, that will be handled automatically. If you're going to put a form on your web site that logs them in then fetch their name and call AccountsGet to fetch their ValCode:antmar904 wrote:thank you, so i got it to the point that when the user fills out the register form it then creates the validation code and emails a 8 char code to them.
how would i then verify if that is the right verification code for that particular user also deny log in until there email has been validated?
Code: Select all
$params = "Password=$pw&Command=AccountsGet" . "&Player=" . urlencode($Player);
$api = Poker_API($url,$params,true);
$ValCode = $api["ValCode"];
Then it didn't get set with your AccountsEdit call. Put an error check to see what it says. Something like this:antmar904 wrote:i also notice that in account property for the new user i don't see there validation code? its blank.
Code: Select all
$api = Poker_API($url,$params,true);
if ($api["Result"] == "Ok") echo "ValCode successfully saved for " . $Player;
else echo "Error saving ValCode: " . $api["Error"] ;
I showed that a couple messages back in this thread.antmar904 wrote:can you help me out with the accountsedit for valcode
wouldn't i be using the AccountsAdd api if i am setting the valcode for the new user on the new account form?Kent Briggs wrote:Use the AccountsEdit API command to set a random ValCode for the player. Then use the mail() command in PHP to send that to them.antmar904 wrote:also is there a way to integrate the email validation into the create new account api?
The Add function doesn't look for a ValCode parameter since that's meant as an internal feature. I may add that in a future update but in the mean time you'll have to set it with AccountsEdit. Are you checking for an error when using AccountsEdit?antmar904 wrote:wouldn't i be using the AccountsAdd api if i am setting the valcode for the new user on the new account form?
i cant seem to get the val code set for the new user.