How to change custom post type status when non-admin updates post?

How to change custom post type status when non-admin updates post?

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