public function registerAction() { if (isset($this->params['doit'])) { $user = new TUser($this->params); if (!$user->save()) { $this->flash['error'] = 'twitter.user.register.error'; return array('user' => $user); } $this->flash['message'] = 'twitter.user.register.ok'; return $this->redirect(array('action' => 'login')); } }