Logging user in..

For discussion of the Poker Mavens server module and other administration topics
lildamien09
Posts: 72
Joined: Sun Sep 13, 2009 7:08 pm
Location: TX

Logging user in..

Post 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.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Logging user in..

Post 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.
lildamien09
Posts: 72
Joined: Sun Sep 13, 2009 7:08 pm
Location: TX

Re: Logging user in..

Post 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...
lildamien09
Posts: 72
Joined: Sun Sep 13, 2009 7:08 pm
Location: TX

Re: Logging user in..

Post 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..
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Logging user in..

Post 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
lildamien09
Posts: 72
Joined: Sun Sep 13, 2009 7:08 pm
Location: TX

Re: Logging user in..

Post 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?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Logging user in..

Post 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.
lildamien09
Posts: 72
Joined: Sun Sep 13, 2009 7:08 pm
Location: TX

Re: Logging user in..

Post by lildamien09 »

so how would i call the password via API into the link?
lildamien09
Posts: 72
Joined: Sun Sep 13, 2009 7:08 pm
Location: TX

Re: Logging user in..

Post 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.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Logging user in..

Post 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.
Post Reply