/** * @param AddUserModel $m * @return ViewResult */ public function addUser($m) { try { $user = new User(); $user->setEmail($m->email); $user->save(); } catch (PropelException $e) { $m->error->message = $e->getMessage(); return $this->View($m); } return $this->RedirectToAction('listUsers'); }
/** * Exclude object from result * * @param ChildUser $user Object to remove from the list of results * * @return $this|ChildUserQuery The current query, for fluid interface */ public function prune($user = null) { if ($user) { $this->addUsingAlias(UserTableMap::COL_ID, $user->getId(), Criteria::NOT_EQUAL); } return $this; }