Magento 1.13.1.0 "customer_entity" table add "last login date time"?

223 views Asked by At

Magento Admin created new column in customer_entity table named "login_at" to store last login date time.

Column is created but not able to insert data into that column on Login?

Any help would be highly appreciated.

I know there is "log/customer' table for it but requirement is to disable Logs and add insert value into "customer_entity" table.

Thanks, Preethy

1

There are 1 answers

1
Pavan Kumar On

This is how my logic is.

  1. override the admin user login success action. create a new custom dispatch event and trigger an observer when the login is success.
  2. Now in that observer capture the current time through DateTime function.
  3. Now capture this value in a variable and load the admin user object and save this variable in ur custom column. NOTE: Check whether the value is available or not. If yes, then you need to override the value.

Let me know if you need any more.