NEW:clear token when account logs out
jira:[for logout] Change-Id: Iafbdc9244419bb689a9626251064517ec5544c3d (cherry picked from commit 6472fbdc6a7e7380538b6e2da29f802831a93157)
This commit is contained in:
parent
a90880193f
commit
5f3ff22218
3 changed files with 5 additions and 5 deletions
|
@ -3730,7 +3730,7 @@ void GUI_App::request_user_logout()
|
|||
{
|
||||
if (m_agent && m_agent->is_user_login()) {
|
||||
// Update data first before showing dialogs
|
||||
m_agent->user_logout();
|
||||
m_agent->user_logout(true);
|
||||
m_agent->set_user_selected_machine("");
|
||||
/* delete old user settings */
|
||||
bool transfer_preset_changes = false;
|
||||
|
|
|
@ -929,11 +929,11 @@ bool NetworkAgent::is_user_login()
|
|||
return ret;
|
||||
}
|
||||
|
||||
int NetworkAgent::user_logout()
|
||||
int NetworkAgent::user_logout(bool request)
|
||||
{
|
||||
int ret = 0;
|
||||
if (network_agent && user_logout_ptr) {
|
||||
ret = user_logout_ptr(network_agent);
|
||||
ret = user_logout_ptr(network_agent, request);
|
||||
if (ret)
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(" error: network_agent=%1%, ret=%2%")%network_agent %ret;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ typedef int (*func_send_message_to_printer)(void *agent, std::string dev_id, std
|
|||
typedef bool (*func_start_discovery)(void *agent, bool start, bool sending);
|
||||
typedef int (*func_change_user)(void *agent, std::string user_info);
|
||||
typedef bool (*func_is_user_login)(void *agent);
|
||||
typedef int (*func_user_logout)(void *agent);
|
||||
typedef int (*func_user_logout)(void *agent, bool request);
|
||||
typedef std::string (*func_get_user_id)(void *agent);
|
||||
typedef std::string (*func_get_user_name)(void *agent);
|
||||
typedef std::string (*func_get_user_avatar)(void *agent);
|
||||
|
@ -164,7 +164,7 @@ public:
|
|||
bool start_discovery(bool start, bool sending);
|
||||
int change_user(std::string user_info);
|
||||
bool is_user_login();
|
||||
int user_logout();
|
||||
int user_logout(bool request = false);
|
||||
std::string get_user_id();
|
||||
std::string get_user_name();
|
||||
std::string get_user_avatar();
|
||||
|
|
Loading…
Reference in a new issue