On 11.04.18 18:23, David Mehler wrote:
Hello Aki,

Thanks for your suggestion. I followed it and the wiki at:

https://wiki.dovecot.org/Plugins/LastLogin

Good news, I get a record in the users table, with the username that
just logged in. This is good. Bad news is I got unexpected output from
the last_login time stamp. Here's the table and the user:

mysql> describe users;
+------------+--------------+------+-----+---------+-------+
| Field      | Type         | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| userid     | varchar(255) | NO   | PRI | NULL    |       |
| last_login | int(11)      | YES  |     | NULL    |       |
+------------+--------------+------+-----+---------+-------+
2 rows in set (0.00 sec)

mysql> select * from users;
+------------------------+------------+
| userid                 | last_login |
+------------------------+------------+
| u...@domain.com | 1523459718 |
+------------------------+------------+
1 row in set (0.01 sec)


The issue is the 1523459718  I was expecting something like a time
stamp. Is this fixable? Also, can I use last_login to see on which IP
the user last logged in from?

SELECT FROM_UNIXTIME(1523459718)

Maybe that will help?

Good luck,
Reio

Reply via email to