Last login date
-
I have created a user list with the last login date.
I now get a number in it “1545377986” instead of a date.
How can I solve that.
-
Whatever you are using to create that has decided to store the date as a Unix timestamp.
In the settings you can tell the plugin that that is how the field is stored.
Once you have saved that, in the format options you’ll be able to choose a format, even a ‘days ago’ option.When I look at my profile, I see the last login date / time.
But if I look in the user list, I see the last login as a number.
At Fields & Nice names I have set up last login as Unix timestamp.
With Config a list, format Last [Login none: ie linktype & css, or custom funtion] (timestamp) none.
I can not select days ago.
I also clicked Rebuild cache now several times.Oh yes, sorry forgot for a moment that the unixtimestamp’s additional format functions are in the ‘plus’ version https://wpusersplugin.com/related-plugins/amr-users-plus/
I purchased the S2user extension for this purpose. Are you saying that I have to buy the Plus version as well? That doesn’t seem right… I sent an email yesterday but have not received response yet.
Hi Josh, I found your email in spam today (wasn’t there yesterday I don’t think, I did check late last night).
No you don’t have to buy the plus plugin. the s2 addon will do a default date time format for the known s2member timestamp fields. Just restested here https://i.imgur.com/xAxGihr.jpg.
If you want more customisation then yes, that is in the plus plugin as that functionality is common to all fields. Alternatively the ‘ausers_format_timestamp_as_date’ function is ‘pluggable’ – you can write your own. https://wpusersplugin.com/2823/formatting-and-pluggable-functions/In the email I found you mention : “each time I go to configure list I have to click “update” before all my settings (which fields I’ve chosen etc) show up” I assume you mean the cache rebuild. Yes sadly that is the case at the moment. In progress, nearly done is a huge update which avoids building a cache list, and directly queries the data. This will be an improvement in many areas. However FYI, except where it is impossible to do a SQL Query ‘ORDER BY’ on the ‘field’ (Unless they have changed the way they store these, S2 member custom fields are an example, since they are ’embedded’ in one big meta value. More info https://wpusersplugin.com/3086/user-lists-and-filtering-with-s2member-fields/}
Thanks for the reply! I’ve sent an email to you with more details.
Marking as resolved since it looks like via email, that you managed a pluggable format function.
The topic ‘Last login date’ is closed to new replies.