[wp-hackers] problem with wp_signon

Guus (IFS) guus at inspiration-for-success.com
Sun May 4 13:15:33 UTC 2014


https://core.trac.wordpress.org/ticket/28116

-----Original Message----- 
From: Jaime Martínez
Sent: Sunday, May 04, 2014 7:34 PM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] problem with wp_signon

Hi Guus,

You mind opening a Trac issue for this if it isn't already there on the 
system. Then it doens't gets lost here on the list and Trac is the place to 
open bugreports, right? Then the likelyhood of it being fixed will be 
bigger.
If you attach a possible patch, maybe even bigger. Thanks.

Greetz,

Jaime

> On 4 mei 2014, at 12:30, "Guus \(IFS\)" <guus at inspiration-for-success.com> 
> wrote:
>
> Thanks for your reply. Tried that and didn't work. I just found myself 
> it's a bug in is_user_logged_in().
>
> Nicest work around I found is to call set_current_user() just after the 
> wp_signon(), of course if the user was really logged in. Answer is here: 
> http://blog.rhysgoodwin.com/programming/wordpress-wp_signon-current_user-is-not-populated/.
>
> I guess it's time for the Wordpress team to fix that bug as it took me 
> hours and hours to figure this out. Didn't expect this type of bug in 
> Wordpress.
>
> Guys,  please fix.
>
> -----Original Message----- From: Nikola Nikolov
> Sent: Sunday, May 04, 2014 4:31 PM
> To: wp-hackers at lists.automattic.com
> Subject: Re: [wp-hackers] problem with wp_signon
>
> I think the cookies are not set on the first load - so you'd have to
> redirect them in order for WordPress to detect that the user is actually
> logged-in.
>
> I could be wrong though, so if someone else has a clue...
>
>
> On Sun, May 4, 2014 at 11:18 AM, Guus (IFS) <
> guus at inspiration-for-success.com> wrote:
>
>> Hi,
>>
>> I am having a problem signing a user in with wp_signon. When calling it
>> (before the headers have been sent) the first time the user appears not 
>> to
>> be logged in when using is_user_logged_in. When going to another page the
>> user is signed in however. Only the first page opened tells the users is
>> signed in, which apparently somehow is the case.
>>
>> Please advise,
>>
>> Guus
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers 



More information about the wp-hackers mailing list