public function addGroupByName($name, $con = null)
 {
     $group = Doctrine::getTable('sfGuardGroup')->findOneByName($name);
     if (!$group) {
         throw new Exception(sprintf('The group "%s" does not exist.', $name));
     }
     $ug = new sfGuardUserGroup();
     $ug->setsfGuardUser($this);
     $ug->setsfGuardGroup($group);
     $ug->save($con);
 }
Example #2
0
 /**
  * @param	sfGuardUserGroup $sfGuardUserGroup The sfGuardUserGroup object to add.
  */
 protected function doAddsfGuardUserGroup($sfGuardUserGroup)
 {
     $this->collsfGuardUserGroups[] = $sfGuardUserGroup;
     $sfGuardUserGroup->setsfGuardGroup($this);
 }
Example #3
0
 public function addsfGuardUserGroup(sfGuardUserGroup $l)
 {
     $this->collsfGuardUserGroups[] = $l;
     $l->setsfGuardGroup($this);
 }