env.get_known_users() should also return session.last_visit — at Version 1
|Reported by:||Owned by:|
|Cc:||osimons, Ryan J Ollos||Branch:|
Description (last modified by )
I'm trying to build up something really lightweight to get people visible in my projects without #2456 and various hardcore TH plugins. I'd like to make use of the last_visited attribute to for example only show recently logged in people. But it turns out I gotta jump through hoops to get to it.
For example th:AccountManagerPlugin goes straight SQL here:
accountmanagerplugin/trunk/acct_mgr/api.py:277: def last_seen(self, user = None):
618 def get_known_users(self, cnx=None): 619 """Generator that yields information about all known users, 620 i.e. users that have logged in to this Trac environment and 621 possibly set their name and email. 622 623 This function generates one tuple for every user, of the form 624 (username, name, email) ordered alpha-numerically by username.
Why couldn't this function also include the apparently orphanized last_visit attribute right there? Can't be a significant performance penalty, can it?