You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
If the user is logged out, present login link instead of user menu #56
BTW, it appears that this isn't an issue on the production site, since it redirects the user to an entirely different login page. We ran into some trouble related to this on the local site, though, so it seems worth fixing.
For reference, here's how you mix PHP if statements with HTML:
<?php if($condition) : ?>
<a href="http://yahoo.com">This will only display if $condition is true</a>
<?php elseif($anotherCondition) : ?>
more html
<?php else : ?>
even more html
<?php endif; ?>
Though in this case you are already inside a large PHP block, so the beginning and ending PHP tags are already taking care of you. Also you don't need the elseif in this case. So, your new code would end up looking more like:
if($condition) : ?>
<a href="http://yahoo.com">This will only display if $condition is true</a>
<?php else : ?>
even more html
<?php endif;
Cool. Good to have the context. I think for starters just being able to know whether you're logged in (and present a different UI then) is a good start.
Activity
iangilman commentedon Oct 2, 2018
BTW, it appears that this isn't an issue on the production site, since it redirects the user to an entirely different login page. We ran into some trouble related to this on the local site, though, so it seems worth fixing.
iangilman commentedon Oct 2, 2018
For reference, here's how you mix PHP if statements with HTML:
Though in this case you are already inside a large PHP block, so the beginning and ending PHP tags are already taking care of you. Also you don't need the elseif in this case. So, your new code would end up looking more like:
rgilman commentedon Oct 2, 2018
The dev site bfn.context.org is using a plugin called Restricted Site Access.
Doing our own re-direct sounds like a good step. I see this as part of the bigger picture in #47 since we will eventually want to send:
I support doing whatever you feel is a useful next step in this direction.
iangilman commentedon Oct 3, 2018
Cool. Good to have the context. I think for starters just being able to know whether you're logged in (and present a different UI then) is a good start.
rgilman commentedon Oct 3, 2018
Works for me.
If user is logged out, present log in link instead of user menu