938 Posts in 271 Topics by 291 members
|Go to End|
20 December 2009 at 7:45pm
I basically have three questions:
1) Is it safe to use the member registration and authentication of the forum module for the rest of my site? I just don't want to use it to authenticate my users to use the forum but for other site features as well. So that I don't need another module for authentication and to make it more integrated.
2) If the answer to question 1 is yes, how can I also check whether or not the user is logged in or not? Because here is what I want: I want it to be the first thing my users see when they visit the site, a login form or when they are logged in, it says welcome "username".
3) How can I grab the sessions for that? So that I can handle the access to other site features as well.
20 December 2009 at 7:57pm
Or better yet, after browsing the forums and a couple of sites, would it be better to create my own user registration and then use the authentication to verify whether or not my users can view the forums?
20 December 2009 at 8:19pm
It'll be fine to use the forum sign in for other parts. Member sign in is a global SS feature so if you sign in to the forum that member is logged in for the rest of the site.
If you want to check a member is logged in you can check in the template using <% if CurrentMember %>Hi $CurrentMember.FirstName<% end_if %>. Or if you need to check for the member in your PHP code you can do Member::currentUser(); which returns a member object if they are logged in or null / false if they aren't logged in.
|Go to Top|