def openid_createuser(request):
  person = openidgae.get_current_person(request, http.HttpResponse())
  email = person.get_email()

  res = util_externals.reponse_if_exists(email)
  if res is not None:
    return res

  nick = util_externals.get_nick_from_email(email)
  
  params = {
    'nick': nick,
    'password': util.generate_password(),
    'first_name': person.get_field_value('firstname', 'none'),
    'last_name': person.get_field_value('lastname', 'none'),
    'fromopenid': True,
    'email':email,
  }
  
  actor_ref = util_externals.user_create('google', params, util.display_nick(email), email)
  
  # NOTE: does not provide a flash message
  response = util.RedirectFlash('/', 'Welcome to %s' - util.get_metadata('SITE_NAME'))
  user.set_user_cookie(response, actor_ref)
  return response
dataset/ETHPy150Open CollabQ/CollabQ/poboxopenid/views.py/openid_createuser/operator `%` -> `-`