1
Mike1234
username/pwd variables
  • 2004/11/2 14:16

  • Mike1234

  • Just popping in

  • Posts: 16

  • Since: 2004/8/16


this is more of an advanced question, I hope has an easy answer. I would like to pass via php the current, logged in XOOPS user's username and password to another application. I have the php syntax for the other application, but am wondering how to get the XOOPS user's username and password variables.

Do I just need to include mainfile.php and then use $username or $password, or should I get the info via SQL from the database, or do I need to use cookies?


thx

2
Mithrandir
Re:username/pwd variables

current logged-in user (the one, viewing a page) is stored in a XoopsUser object.

You can access the properites with $xoopsUser->getVar('uname') and $xoopsUser->getVar('pass') respectively.

Note that the password value is encrypted with the MD5 algorithm, so your other application will have to take that into consideration.

3
ejuden01
Re: username/pwd variables
  • 2004/11/2 14:36

  • ejuden01

  • Not too shy to talk

  • Posts: 121

  • Since: 2004/4/5 1


You can retrieve the username and password using the $xoopsUser object. I think that the password will be retrieved as md5 format(anybody know this for sure?).

To retrieve the username from the currently logged in user:
$username $xoopsUser->getVar('uname');


To retrieve the password from the currently logged in user:
$pass $xoopsUser->getVar('pass');

4
ejuden01
Re: username/pwd variables
  • 2004/11/2 14:38

  • ejuden01

  • Not too shy to talk

  • Posts: 121

  • Since: 2004/4/5 1


I took too long filling it out...Mithy beat me.

5
Mike1234
Re: username/pwd variables
  • 2004/11/2 16:45

  • Mike1234

  • Just popping in

  • Posts: 16

  • Since: 2004/8/16


thanks to you both

Login

Who's Online

182 user(s) are online (118 user(s) are browsing Support Forums)


Members: 0


Guests: 182


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits