How to unset a function from a action inside a class, that is called in another class

How to unset a function from a action inside a class, that is called in another class

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)