Page 1 of 2

Logging user in..

Posted: Wed Sep 30, 2009 12:09 pm
by lildamien09
Is it possible to the log a user in automatically from my site to the application with out using a session key far exampl like loggin in to the remote admin with the ?password=mypass .. if not could someone assist me in setting the sessions option up.. and passing seesions through my site with the api.

Re: Logging user in..

Posted: Wed Sep 30, 2009 12:17 pm
by Kent Briggs
lildamien09 wrote:Is it possible to the log a user in automatically from my site to the application with out using a session key far exampl like loggin in to the remote admin with the ?password=mypass .. if not could someone assist me in setting the sessions option up.. and passing seesions through my site with the api.
Yes, use LoginPassword instead of SessionKey. See the Technical Information | Misc topic in the help file for instructions.

Re: Logging user in..

Posted: Wed Sep 30, 2009 12:22 pm
by lildamien09
ok thanks. im gonna have to read the help file thouroughly so that i can answer some of my future question with out posting them here...

Re: Logging user in..

Posted: Wed Sep 30, 2009 12:25 pm
by lildamien09
it would be in the api section correct?

im sorry i see it in the misc tab i didnt read your post thouroughly..

Re: Logging user in..

Posted: Wed Sep 30, 2009 12:31 pm
by Kent Briggs
lildamien09 wrote:it would be in the api section correct?
To create a session key with the API, see the AccountsSessionKey command in the help file under Technical Information | API.

For examples of how to use the API with PHP, see this page:

http://www.briggsoft.com/docs/pmavens/API_Examples.htm

Re: Logging user in..

Posted: Wed Sep 30, 2009 1:02 pm
by lildamien09
okay i have a problem.. my users passwords are MD5 Encrypted in my database so when i call ?LoginName=therename&LoginPassword=<?php echo $info['xpassword']; ?> the password displays the MD5 encryption instead of the actual password which cause login to fail being that the stored passwords on the poker server arent MD5 encrypted.. any way around this?

Re: Logging user in..

Posted: Wed Sep 30, 2009 1:24 pm
by Kent Briggs
lildamien09 wrote:okay i have a problem.. my users passwords are MD5 Encrypted in my database so when i call ?LoginName=therename&LoginPassword=<?php echo $info['xpassword']; ?> the password displays the MD5 encryption instead of the actual password which cause login to fail being that the stored passwords on the poker server arent MD5 encrypted.. any way around this?
If you're creating player accounts with the API then you could just store a random value for each player's password. Since you're logging them in automatically, they don't need to remember it. And if you log them in with a SessionKey then your code doesn't even need to go look it up.

Re: Logging user in..

Posted: Wed Sep 30, 2009 1:26 pm
by lildamien09
so how would i call the password via API into the link?

Re: Logging user in..

Posted: Wed Sep 30, 2009 2:01 pm
by lildamien09
Well what i ended up doing is creating a table for a second password and having the second password as its original value when added to table. so i can call the second PW for the link.. thanks for your help Kent.

Re: Logging user in..

Posted: Wed Sep 30, 2009 2:53 pm
by Kent Briggs
lildamien09 wrote:Well what i ended up doing is creating a table for a second password and having the second password as its original value when added to table. so i can call the second PW for the link.. thanks for your help Kent.
You could also use the API to fetch the player's password from his Poker Mavens account info using the AccountsGet API command. But if you were going to do that, you might as well just call AccountsSessionKey and use it instead, since it's more secure.