def _identify_user_default():
 g.user = request.environ.get(u'REMOTE_USER', u'')
 if g.user:
  g.user = g.user.decode(u'utf8')
  g.userobj = model.User.by_name(g.user)
  if ((g.userobj is None) or (not g.userobj.is_active())):
   ev = request.environ
   if (u'repoze.who.plugins' in ev):
    pth = getattr(ev[u'repoze.who.plugins'][u'friendlyform'], u'logout_handler_path')
    redirect(pth)
 else:
  g.userobj = _get_user_for_apikey()
  if (g.userobj is not None):
   g.user = g.userobj.name

def _identify_user_default ( ) : g . user = request . environ . get ( u'REMOTE_USER' , u'' ) if g . user : g . user = g . user . decode ( u'utf8' ) g . userobj = model . User . by_name ( g . user ) if ( ( g . userobj is None ) or ( not g . userobj . is_active ( ) ) ) : ev = request . environ if ( u'repoze.who.plugins' in ev ) : pth = getattr ( ev [ u'repoze.who.plugins' ] [ u'friendlyform' ] , u'logout_handler_path' ) redirect ( pth ) else : g . userobj = _get_user_for_apikey ( ) if ( g . userobj is not None ) : g . user = g . userobj . name
identifies the user using two methods: a) if they logged into the web interface then repoze .