Closed (fixed)
Project:
Token
Version:
6.x-1.12
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 May 2010 at 22:04 UTC
Updated:
19 Jun 2010 at 16:00 UTC
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
Comment #1
sdsheridan...and just realised 'reg-since' seems to have the same problem, vis-a-vis not subtracting from time().
Comment #2
dave reidYep you're right. Fixed this bug in CVS. Thanks!
http://drupal.org/cvs?commit=375760