Forums / Developer / Finding out whether the user has ever logged in

Finding out whether the user has ever logged in

Author Message

Slavo Uhrin

Monday 18 July 2005 5:54:39 am

Is it possible to find out if the user has ever logged in itself?

independent eZ developer | http://howgh.sk

Eivind Marienborg

Monday 18 July 2005 6:54:21 am

I think you might be able to use the last logged in timestamp. I suppose that will be blank if the user hasn't logged in yet.

But the timestamp isn't available in all versions of eZ Publish, as far as I've understood.

Slavo Uhrin

Monday 18 July 2005 7:00:45 am

Thanks, do I need to use a SQL query or is there any way how to get it via the standard template mechanism?

independent eZ developer | http://howgh.sk

Eivind Marienborg

Monday 18 July 2005 7:07:04 am

It's not available in the eZ version I'm running, so I'm not completely sure. But you might try {$user.last_visit_timestamp}, and change the 'user' to current_user/node or whatever you're getting it from.

eZ debug

Timing: Jan 18 2025 03:06:38
Script start
Timing: Jan 18 2025 03:06:38
Module start 'content'
Timing: Jan 18 2025 03:06:39
Module end 'content'
Timing: Jan 18 2025 03:06:39
Script end

Main resources:

Total runtime0.0193 sec
Peak memory usage4,096.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 589.1641180.8125
Module start 'content' 0.00650.0070 769.976693.8359
Module end 'content' 0.01350.0057 863.812570.7031
Script end 0.0192  934.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002211.1707120.0002
Check MTime0.00115.5038120.0001
Mysql Total
Database connection0.00094.649710.0009
Mysqli_queries0.002714.054240.0007
Looping result0.00000.072920.0000
Template Total0.005327.610.0053
Template load0.00084.276510.0008
Template processing0.004523.303010.0045
Override
Cache load0.00063.022010.0006
General
dbfile0.002111.0397100.0002
String conversion0.00000.024730.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs