def get_userid(self): """ Get current user id. By default it uses ``pyramid.security.authenticated_userid``""" uri = tldata.get(USER_KEY, _not_set) if uri is _not_set: self.set_userid(authenticated_userid(get_current_request())) return tldata.get(USER_KEY) return uri
def get_userid(self): uid = tldata.get(USER_KEY, _not_set) if uid is _not_set: try: self.set_userid(authenticated_userid(get_current_request())) except: # pragma: no cover self.set_userid(None) return tldata.get(USER_KEY) return uid
def get_effective_userid(self): """ Return effective user uri, of current user uri. """ uri = tldata.get(EFFECTIVE_USER_KEY, _not_set) if uri is _not_set: return self.get_userid() return uri
def get_effective_userid(self): uri = tldata.get(EFFECTIVE_USER_KEY, _not_set) if uri is _not_set: return self.get_userid() return uri
def get_userid(self): uri = tldata.get(USER_KEY, _not_set) if uri is _not_set: self.set_userid(authenticated_userid(get_current_request())) return tldata.get(USER_KEY) return uri