21278 Posts in 5728 Topics by 2599 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1310 Views |
-
How To Use SilverStripe For Company Intranet ??

10 April 2010 at 7:21pm
We have selected SilverStripe For Our Company Employee Intranet
We want that the site has to be secured and therefore I have added following in Page Class after studying security documents on webparent::init();
if($this->URLSegment != 'Security' && !Permission::check("VIEW_SITE"))
Security::permissionFailure(null);This code works but there is no logout link on page
How to get log out link on page (just like admin user) for all logged in users ?
Regards ,
AJIT
-
Re: How To Use SilverStripe For Company Intranet ??

10 April 2010 at 7:25pm
We are implimenting version 2.4.2 RC2
-
Re: How To Use SilverStripe For Company Intranet ??

11 April 2010 at 11:54am Last edited: 11 April 2010 11:55am
How to get log out link on page (just like admin user) for all logged in users ?
<% if CurrentMember %>
<a href="Security/logout">Log out</a>
<% end_if %>That code basically says If logged in, add a link tag to logout. (Security/logout is the logout handler).
-
Re: How To Use SilverStripe For Company Intranet ??

11 April 2010 at 1:09pm
I have done this but how to make following line work in footer template ?
<% _t('LOGGEDINAS','Logged in as') %> <strong><% if FirstName && Surname %>$FirstName $Surname<% else_if FirstName %>$FirstName<% else %>$Email<% end_if %></strong>
How to make Firstname & Lastname available when any user logs in ?
Regards
AJIT
-
Re: How To Use SilverStripe For Company Intranet ??

11 April 2010 at 2:03pm
Well if they are logged in then you have the $CurrentMember Object. So you can call any member functions on like like $CurrentMember.FirstName $CurrentMember.Email or just wrap your code in a <% control CurrentMember %>
| 1310 Views | ||
|
Page:
1
|
Go to Top |


