~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/database.py

  • Committer: matt.giuca
  • Date: 2009-01-14 08:05:12 UTC
  • mto: This revision was merged to the branch mainline in revision 1090.
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:branches%2Fstorm:1131
ivle.database.User: Added get_by_login method.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
        """
111
111
        fieldval = self.acct_exp
112
112
        return fieldval is not None and time.localtime() > fieldval
 
113
 
 
114
    @classmethod
 
115
    def get_by_login(cls, store, login):
 
116
        """
 
117
        Get the User from the db associated with a given store and
 
118
        login.
 
119
        """
 
120
        return store.find(cls, cls.login == login).one()