Lastlogin Mod

Lastlogin Mod 1

No permission to download
Forum
Last Post
Threads / Messages
Go to your users_profile table, then to Structure, and add a new column:

lastlogin | VARCHAR | 25 | Default: Define as ?

enter.

Go to class_userprofile.php and add this above your bio info:

$date = new DateTime;

$mysidia->db->update("users_profile", array("lastlogin" => $date->format("m-d-Y")), "uid = '{$mysidia->user->uid}'");

$lastlogin = $mysidia->db->select("users_profile", array("lastlogin"), "username = '{$mysidia->input->get("user")}'")->fetchColumn();

Then in the bio, this:
<br>Last worked: {$lastlogin}


And that's it! :) You can change the m-d-Y area to display how you want, just make sure the year is capital Y. I like it to display month first, then day, then year. But apparently default is: year, day, month, and my brain doesn't like that lol.
  • login.png
    login.png
    1.3 MB · Views: 119
Author
GeneticAlpha
Downloads
0
Views
415
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from GeneticAlpha

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,267
Messages
33,048
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top