/**
  * Sign up new User
  *
  * @return \Framework\Response\Response
  */
 public function signupAction()
 {
     if (ServiceContainer::get('security')->isAuthenticated()) {
         $redirect = new ResponseRedirect($this->generateRoute('performance_home'));
         $redirect->send();
     }
     $errors = array();
     if ($this->getRequest()->isPost() == 'POST') {
         try {
             $user = new User();
             $user->name = $this->getRequest()->post('name');
             $user->email = $this->getRequest()->post('email');
             $user->password = md5($this->getRequest()->post('password'));
             $user->user_role = 'ROLE_USER';
             $user->save();
             return $this->redirect($this->generateRoute('security_signin'));
         } catch (\Exception $e) {
             $errors = array($e->getMessage());
         }
     }
     return $this->render('signup.html', array('errors' => $errors));
 }