public function mysql_delete() { $ws = $this->get_UserWorkspace(); $shares = UserShare::from_property(array("UserWorkspace_id" => $this->UserWorkspace_id, "invitee_id" => $this->invitee_id)); if ($ws != null && count($shares) <= 1) { $ws->revoke_privileges_db_user($this->invitee_id); } parent::mysql_delete(); }
public function remove_shares() { foreach (UserShare::from_property(array("UserWorkspace_id" => $this->id)) as $share) { $share->mysql_delete(); } }
public function get_shares() { return UserShare::from_property(array("invitee_id" => $this->id)); }