1
basza
tracking users
  • 2005/7/28 1:20

  • basza

  • Just popping in

  • Posts: 73

  • Since: 2004/6/21


Hi I would like to know how I would be able to track/display the users id and login name within another module which I'm making?

Thanks in advance.

2
fo-fo
Re: tracking users
  • 2005/7/28 8:45

  • fo-fo

  • Just popping in

  • Posts: 34

  • Since: 2005/4/13


cookie?

3
basza
Re: tracking users
  • 2005/7/28 8:54

  • basza

  • Just popping in

  • Posts: 73

  • Since: 2004/6/21


isn't there some sort of global thing like xoops_use

So that when a user goes into a module you can welcome them and display some information about them by name.

4
bluenova
Re: tracking users

{$xoops_uname} will display the username

5
basza
Re: tracking users
  • 2005/7/28 9:35

  • basza

  • Just popping in

  • Posts: 73

  • Since: 2004/6/21


Thank you for that.

Now can that be called outside of a template file, I can't head my head around those things, and does a global need to be set in the page calling it?

6
basza
Re: tracking users
  • 2005/7/28 12:29

  • basza

  • Just popping in

  • Posts: 73

  • Since: 2004/6/21


Maybe I'm asking this wrong.

I have a plain php file, not a template, and I am wanting to dispaly users name. I have seen how it can be done using templates but can not figure it out for a plain php file.

Thanks in advance

7
ackbarr
Re: tracking users

include "mainfile.php"//adjust to the proper path to mainfile.php

if ($xoopsUser) {
  echo 
$xoopsUser->getVar("uid");
  echo 
$xoopsUser->getVar("uname");
} else {
  echo 
"Anonymous User";
}
Site Hosting - PlanetXoops

8
basza
Re: tracking users
  • 2005/7/28 13:42

  • basza

  • Just popping in

  • Posts: 73

  • Since: 2004/6/21


yes that wast it.

Thanks

9
psindia
Re: tracking users
  • 2005/7/28 16:43

  • psindia

  • Not too shy to talk

  • Posts: 171

  • Since: 2005/3/31


Please don't visit ==>tenthstone.com!
==>vinodsr.com!

10
fo-fo
Re: tracking users
  • 2005/7/28 18:20

  • fo-fo

  • Just popping in

  • Posts: 34

  • Since: 2005/4/13


I thought {$xoops_uname} in custom modules is non-usable...

...or was it the blocks...

Login

Who's Online

154 user(s) are online (98 user(s) are browsing Support Forums)


Members: 0


Guests: 154


more...

Donat-O-Meter

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

Latest GitHub Commits