thank you but in my case even when the user already loged in its redirect to the log in,the check_login() is returning true!!

I can't pass true to the function , bc this will allow unauthorised users to see the script.
I don't what changed since 1.2.3 for this function