Page 1 of 1

Detect a logged in user

PostPosted: October 10th, 2011, 12:10 pm
by dcp3450
I want to detect if a visitor is logged in. If they are I want to display a "Welcome [name]...", if the user isn't logged in then I want to display a become a member button.

I would assume s2member has a isLoggedIn function or even a session I can detect. The php I can handle I'm just not sure how to detect if the user has logged in.

thanks,

Re: Detect a logged in user

PostPosted: October 10th, 2011, 12:19 pm
by dcp3450
after some hunting I found that wordpress can handle this:

http://codex.wordpress.org/Function_Ref ... _logged_in

Re: Detect a logged in user

PostPosted: October 10th, 2011, 4:12 pm
by Eduan
Glad you found it.