Hide login after logged in

Permalink Browser Info Environment
I am trying to hard code the login block so I don't have to manually add it to every page

So I have successfully enabled register link and return to same page, but the same isn't working for when logged in it shows 'signed in as user'

$loginBT = BlockType::getByHandle('login');
$loginBT->controller->showRegisterLink = 'true';
$loginBT->controller->returnToSamePage = 'true';
$loginBT->controller->hideFormUponLogin = 'true';


I assume I'm on the right lines

Help!

Ta

Type: Discussion
Status: Archived
geekeboy
View Replies:
GregJoyce replied on at Permalink Reply
GregJoyce
I think you're on the right track here, that might just need `$loginBT->render('display');` and you're all done. Frankly the easiest way to do this would be to simply create a globalArea where you want your login to be. Then if you want to change the options later, you don't need to go back in to your page types and change the all.

So just
$a = new GlobalArea('Login Block');
$a->display();


and you should be all set.
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.