Skip to content

Commit

Permalink
fix #845
Browse files Browse the repository at this point in the history
  • Loading branch information
joyqi committed Mar 16, 2019
1 parent 8045a0d commit 32c2f82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion .
3 changes: 3 additions & 0 deletions var/Widget/Logout.php
Expand Up @@ -28,6 +28,9 @@ class Widget_Logout extends Widget_Abstract_Users implements Widget_Interface_Do
*/
public function action ()
{
// protect
$ this -> security -> protect ();

$ this -> user -> logout ();
$ this -> pluginHandle ()-> logout ();
$ this -> response -> goBack ( NULL , $ this -> options -> index );
Expand Down
3 changes: 2 additions & 1 deletion var/Widget/Options.php
Expand Up @@ -251,7 +251,8 @@ protected function ___profileUrl()
*/
protected function ___logoutUrl ()
{
return Typecho_Common :: url ( '/action/logout' , $ this -> index );
return $ this -> widget ( 'Widget_Security' )-> getTokenUrl (
Typecho_Common :: url ( '/action/logout' , $ this -> index ));
}

/**
Expand Down

0 comments on commit 32c2f82

Please sign in to comment.