Page 1 of 1

automated validation

Posted: Wed Nov 07, 2012 2:05 pm
by TheMark
Is there a way to send the validation code to be entered automatically the same way the "login.php" file logs the player in from a website to PM?

Right now the player would sign up on our site and the login credentials are stored on our db but when created they are stored in PM also. I also used our verification email code to store as the ValCode on PM.

I know this seems redundant but I'm worried that somebody may try to use the "create a new account" feature in PM without having to create the account on our site.

so right now I'm trying this. first i get the ValCode from PM (and the other info for API call) then redirect like in your login.php example.

header("Location:" . $server . "/?LoginName=" . $player . "&SessionKey=" . $key . "&ValCode=" . $Valcode);

Re: automated validation

Posted: Wed Nov 07, 2012 3:06 pm
by Kent Briggs
If you want to validate from your web site, just fetch the ValCode with AccountsGet and if that matches what the player typed in, just call AccountsEdit and blank it out. Then log them in.

Re: automated validation

Posted: Wed Nov 07, 2012 3:11 pm
by Kent Briggs
TheMark wrote:I'm worried that somebody may try to use the "create a new account" feature in PM without having to create the account on our site.
You can disable that feature so they will have to create it on your web site. Set "Allow new accounts" to No in the Account Settings group. That only applies to the player client. It does not prevent you from creating accounts manually or via the API. There is also an "Allow account changes" setting that you may want to disable.

Re: automated validation

Posted: Wed Nov 07, 2012 6:20 pm
by TheMark
ah yes thats even easier than how I was thinking I could do it! thanks Ken