i also notice that in account property for the new user i don't see there validation code? its blank.
autmated login
-
- Site Admin
- Posts: 5878
- Joined: Wed Mar 19, 2008 8:47 pm
Re: autmated login
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"];
-
- Site Admin
- Posts: 5878
- Joined: Wed Mar 19, 2008 8:47 pm
Re: autmated login
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"] ;
Re: autmated login
can you help me out with the accountsedit for valcode
-
- Site Admin
- Posts: 5878
- Joined: Wed Mar 19, 2008 8:47 pm
Re: autmated login
I showed that a couple messages back in this thread.antmar904 wrote:can you help me out with the accountsedit for valcode
Re: autmated login
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?
i cant seem to get the val code set for the new user.
-
- Site Admin
- Posts: 5878
- Joined: Wed Mar 19, 2008 8:47 pm
Re: autmated login
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.
Actually you don't need to set it at all inside Poker Mavens if you are going to handle the verification from your own web site. Just create a local file or database and save it locally with the player's name. Then look it up from there when you attempt to log in.