File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ const Sidebar = require( 'layout/sidebar' ),
18
18
config = require ( 'config' ) ,
19
19
ProfileGravatar = require ( 'me/profile-gravatar' ) ,
20
20
eventRecorder = require ( 'me/event-recorder' ) ,
21
- user = require ( 'lib/user' ) ( ) ;
21
+ user = require ( 'lib/user' ) ( ) ,
22
+ userUtilities = require ( 'lib/user/utils' ) ;
22
23
23
24
import Button from 'components/button' ;
24
25
import purchasesPaths from 'me/purchases/paths' ;
@@ -49,9 +50,13 @@ const MeSidebar = React.createClass( {
49
50
redirect = '/?apppromo' ;
50
51
}
51
52
52
- this . props . logoutUser ( redirect ) . then ( ( { redirect_to } ) => {
53
- user . clear ( ( ) => location . href = redirect_to || '/' ) ;
54
- } ) ;
53
+ if ( config . isEnabled ( 'login/wp-login' ) ) {
54
+ this . props . logoutUser ( redirect ) . then ( ( { redirect_to } ) => {
55
+ user . clear ( ( ) => location . href = redirect_to || '/' ) ;
56
+ } ) ;
57
+ } else {
58
+ userUtilities . logout ( redirect ) ;
59
+ }
55
60
56
61
this . recordClickEvent ( 'Sidebar Sign Out Link' ) ;
57
62
} ,
You can’t perform that action at this time.
0 commit comments