I was using these tokens, and found that it had been 40 years and 22 weeks since I had logged in. "Odd," I thought, and so looked at the code. Turns out there were two problems (I believe). The first being that the computations for the tokens were using the access attribute of the $account object, and the second being that the 'log-since' token was not computing an interval. I believe the two lines should read...

      $values['log-date']       = $account->uid ? format_date($account->login, 'short') : '';
      $values['log-since']      = $account->uid ? format_interval(time() - $account->login) : '';

Shawn

Comments

sdsheridan’s picture

...and just realised 'reg-since' seems to have the same problem, vis-a-vis not subtracting from time().

dave reid’s picture

Status: Active » Fixed

Yep you're right. Fixed this bug in CVS. Thanks!
http://drupal.org/cvs?commit=375760

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.