1
jthtol
Output last time user logged in
  • 2003/12/14 5:38

  • jthtol

  • Just popping in

  • Posts: 13

  • Since: 2003/9/9 2


What would the code be to output on the site when the user last logged in?

2
Mithrandir
Re: Output last time user logged in

$xoopsUser->getVar('last_login');

3
jthtol
Re: Output last time user logged in
  • 2003/12/14 17:29

  • jthtol

  • Just popping in

  • Posts: 13

  • Since: 2003/9/9 2


Yes but How would I include that in my theme.html?

Which is where I want to show the data.

4
CBlue
Re: Output last time user logged in

Where on your theme do you want this data to show?

5
jthtol
Re: Output last time user logged in
  • 2003/12/14 18:21

  • jthtol

  • Just popping in

  • Posts: 13

  • Since: 2003/9/9 2


It will show in the header at the top of my page.

6
Mithrandir
Re: Output last time user logged in

showing something on each and every page of your site requires you to do the changes in theme.html and possibly header.php as well.

The last login time is not normally available, but I suggest that you in the last line of your header.php includes your "customsettings.php" in which you assign extra variables to Smarty for use in the theme.html.

In that customsettings.php you could use a simple
$smarty->assign('lastlogin', $xoopsUser->getVar('last_login'));

then you can use $lastlogin in your templates.

7
CBlue
Re: Output last time user logged in

ignore this post!

8
jthtol
Re: Output last time user logged in
  • 2003/12/15 1:37

  • jthtol

  • Just popping in

  • Posts: 13

  • Since: 2003/9/9 2


I dont seem to a have a file called customsettings.php
Am I suppose to?

9
CBlue
Re: Output last time user logged in

I don't have one either!

10
PureLuXus
Re: Output last time user logged in
  • 2003/12/15 7:13

  • PureLuXus

  • Not too shy to talk

  • Posts: 116

  • Since: 2002/1/3 2


create it and include it in the header.php
offtopic:
i want something like "last action on xx:xx:xx" with action i mean click
i want add it on the user profil.

Login

Who's Online

408 user(s) are online (278 user(s) are browsing Support Forums)


Members: 0


Guests: 408


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