How to add "last_ip" filed in a doctype

Thanks a lot for the reply.

We use ERPN in our local LAN where we need to log local IP addresses like 192.168., which of course cannot be gotten via Amazone you’ve mentioned.
I am wondering how it is used in User doctype why it can’t be used elsewhere !

But your code was definitely taught me something new :slight_smile: