<?php

class loginUserAction extends openidAction {

  public function execute($request) {
    if ($request->isMethod('post')) {
      if (sfConfig::get('app_openid_fake') === true) {
        $user = $this->getUser();
        $user->login(null);
        return $this->redirect('@homepage');
      } else {
        // Get openid object
        $openid = $this->getOpenIdObject();

        // Redirect to open id provider
        $redirectUrl = $openid->getRedirectURL(false);
        return $this->redirect($redirectUrl['content']);
      }
    }

  	return "Form";
  }
}