Welcome Guest, Not a member yet? Register   Sign In
Ion Auth: Last login and Created On display
#1

[eluser]qpixo[/eluser]
I'm having trouble to display the correct date format of Last Login and Created On.

I'm currently getting that display
ex: Last Login 1344050864

I want to display like that ex: 2012-02-21

Does anyone know how to fix that in Ion Auth?
#2

[eluser]solid9[/eluser]
Have you tried reading first the IonAuth doc?
and reading the codes of that particular method?,
in IonAuth?
#3

[eluser]qpixo[/eluser]
[quote author="solid9" date="1344265013"]Have you tried reading first the IonAuth doc?
and reading the codes of that particular method?,
in IonAuth?[/quote]

http://benedmunds.com/ion_auth/
I read this doc but there's nothing mentioned about last_login and created on dates.

#4

[eluser]the_unforgiven[/eluser]
Try wrapping it in
Code:
unix_to_human();

Read -> http://ellislab.com/codeigniter/user-gui...elper.html this will also help you!
#5

[eluser]balboa_1990[/eluser]
You have probably found the solution to this by now but if anyone has a problem i solved it like this:


Change the created_on or last_login to the Type: datetime and Default as: 0000-00-00 00:00:00.

In the model where the user array is i changed it to this:

Code:
$data = array(
      'username'   => $username,
      'password'   => $password,
      'email'      => $email,
      'created_on' => date("Y-m-d H:i:s"),
      'last_login' => date("Y-m-d H:i:s"),
      'active'     => ($manual_activation === false ? 1 : 0)
  );

Hope this helps people as it took my some play about to get it how i wanted!




Theme © iAndrew 2016 - Forum software by © MyBB