User roles are changing automatically

Good catch with the action, catching the instance.

You might be able to add a debug_backtrace() to trace it back to the calling functions, and their calling functions, to see how you actually get there.

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