def _get_user(username):
 if (not username):
  return None
 try:
  if (c.userobj and (c.userobj.name == username)):
   return c.userobj
 except AttributeError:
  pass
 except TypeError:
  pass
 return model.User.get(username)

def _get_user ( username ) : if ( not username ) : return None try : if ( c . userobj and ( c . userobj . name == username ) ) : return c . userobj except AttributeError : pass except TypeError : pass return model . User . get ( username )
retrieve user with provided user_id args: user_id: username of the user for which object is to retrieve returns: obj .