Pimcore\Model\User\Dao::delete PHP Метод

delete() публичный Метод

Deletes object from database
public delete ( ) : void
Результат void
    public function delete()
    {
        parent::delete();
        $userId = $this->model->getId();
        // cleanup system
        // assets
        $this->db->update("assets", ["userOwner" => null], $this->db->quoteInto("userOwner = ?", $userId));
        $this->db->update("assets", ["userModification" => null], $this->db->quoteInto("userModification = ?", $userId));
        $this->db->delete("users_workspaces_asset", $this->db->quoteInto("userId = ?", $userId));
        // documents
        $this->db->update("documents", ["userOwner" => null], $this->db->quoteInto("userOwner = ?", $userId));
        $this->db->update("documents", ["userModification" => null], $this->db->quoteInto("userModification = ?", $userId));
        $this->db->delete("users_workspaces_document", $this->db->quoteInto("userId = ?", $userId));
        // objects
        $this->db->update("objects", ["o_userOwner" => null], $this->db->quoteInto("o_userOwner = ?", $userId));
        $this->db->update("objects", ["o_userModification" => null], $this->db->quoteInto("o_userModification = ?", $userId));
        $this->db->delete("users_workspaces_object", $this->db->quoteInto("userId= ?", $userId));
        // versions
        $this->db->update("versions", ["userId" => null], $this->db->quoteInto("userId = ?", $userId));
    }