PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Detect a logged in user

s2Member Plugin. A Membership plugin for WordPress®.

Detect a logged in user

Postby dcp3450 » October 10th, 2011, 12:10 pm

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,
User avatar
dcp3450
Registered User
Registered User
 
Posts: 2
Joined: October 10, 2011

Re: Detect a logged in user

Postby dcp3450 » October 10th, 2011, 12:19 pm

after some hunting I found that wordpress can handle this:

http://codex.wordpress.org/Function_Ref ... _logged_in
User avatar
dcp3450
Registered User
Registered User
 
Posts: 2
Joined: October 10, 2011

Re: Detect a logged in user

Postby Eduan » October 10th, 2011, 4:12 pm

Glad you found it.
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.


Return to s2Member Plugin

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron