Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Forum Module /

Discuss the Forum Module.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

User Accounts

Go to End

3 Posts   1836 Views


Community Member, 121 Posts

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.

Thanks! :)


Community Member, 121 Posts

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?


Forum Moderator, 5523 Posts

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.