code: def by_login(cls, session, login, local=True):
          
          user = cls.first(session,
                           where=((cls.login == login),
                                  (cls.local == local),)
                           )
          # XXX it's appear that this is not case sensitive !
          return user if user and user.login == login else None
docs: Get a user from a given login.
  
          :param session: SQLAlchemy session
          :type session: :class:`sqlalchemy.Session`
  
          :param login: the user login
          :type login: unicode
  
          :return: the associated user
          :rtype: :class:`pyshop.models.User`