I am trying to make a custom PHP field that returns the value of 'user last access' field as an integer of minutes 'time ago'.
I have created a normal views field for 'user last access' which returns almost exactly what I want from the normal field value:
x mins - this being x mins time ago, created by using 1 as the time units to display.
I just don't know how to return this value through a new PHP field that just references and displays the integer value for this field without ' mins' text ?
I want to then take this raw value and use a conditional statement of:
If user last access is less than 3 minutes print 'Online' else Print 'Offline'