Go to entry/signin after logged in
vanilla 2.1.3 ozone 2.1
Is it normal when you go to entry/signin after u logged in, you can login another time?
Shouldnt there be a message saying: Already logged in, or just a redirect to /discussions/?
And if not, is it possible to send them when logged in to /discussions/?
Asking this, cause i have a link added to my menu within a pocket that redirects to entry/signin/, but this link in the menu stays when u already logged in....
Thanks
Best Answers
-
vrijvlinder MVP
To make a link change to sign out from sign in , you need to add the session part to it.
$Session = Gdn::Session(); if ($this->Menu) { $Authenticator = Gdn::Authenticator(); if ($Session->IsValid()) { $this->Menu->AddLink('SignOut', T('Sign Out'), $Authenticator->SignOutUrl(), FALSE, array('class' => 'NonTab SignOut')); } else { $Attribs = array(); if (C('Garden.SignIn.Popup') && strpos(Gdn::Request()->Url(), 'entry') === FALSE) $Attribs['class'] = 'SignInPopup'; $this->Menu->AddLink('Entry', T('Sign In'), $Authenticator->SignInUrl($this->SelfUrl), FALSE, array('class' => 'NonTab'), $Attribs); }
2 -
hgtonight MVP
You can sign in as someone else. If you want a message to be displayed, hook into the view and add a message if there is a valid session.
EDIT - Crosspost with @vrijvlinder
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
1
Answers
To make a link change to sign out from sign in , you need to add the session part to it.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
You can sign in as someone else. If you want a message to be displayed, hook into the view and add a message if there is a valid session.
EDIT - Crosspost with @vrijvlinder
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.