def logout_user():
 user = _get_user()
 if ('user_id' in session):
  session.pop('user_id')
 if ('_fresh' in session):
  session.pop('_fresh')
 cookie_name = current_app.config.get('REMEMBER_COOKIE_NAME', COOKIE_NAME)
 if (cookie_name in request.cookies):
  session['remember'] = 'clear'
 user_logged_out.send(current_app._get_current_object(), user=user)
 current_app.login_manager.reload_user()
 return True

def logout_user ( ) : user = _get_user ( ) if ( 'user_id' in session ) : session . pop ( 'user_id' ) if ( '_fresh' in session ) : session . pop ( '_fresh' ) cookie_name = current_app . config . get ( 'REMEMBER_COOKIE_NAME' , COOKIE_NAME ) if ( cookie_name in request . cookies ) : session [ 'remember' ] = 'clear' user_logged_out . send ( current_app . _get_current_object ( ) , user = user ) current_app . login_manager . reload_user ( ) return True
logs out the current .