Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 public function remove_shares()
 {
     foreach (UserShare::from_property(array("UserWorkspace_id" => $this->id)) as $share) {
         $share->mysql_delete();
     }
 }
Exemplo n.º 3
0
 public function get_shares()
 {
     return UserShare::from_property(array("invitee_id" => $this->id));
 }