Getting logged out over HTTPS when uploading profile images
-
Our site enforces HTTPS, and users who tried to upload a new profile picture are getting logged out. In Chrome Developer tools network tab, I saw that
async-upload.phpwas getting redirected towp-login.php, and the image upload was failing with error, “An error occured in the upload. Please try again later.”Upon investigation, I found that line 219 of
user/class-user-action.phpcontained:$login_user = @wp_signon($creds, false);According to the Codex:
https://codex.ww.wp.xz.cn/Function_Reference/wp_signon
falsemeans to NOT use a secure cookie. Changing that value totruefixed the issue for us.This seems like a bug that should be fixed, no? We are running WordPress 5.1 and WP User 5.9.3.
Thanks!
The topic ‘Getting logged out over HTTPS when uploading profile images’ is closed to new replies.