diff options
author | Ray Strode <rstrode@redhat.com> | 2018-02-14 10:00:19 -0500 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2018-02-14 10:02:51 -0500 |
commit | a045e06a3c2d231f365f8e321036e2d56c73e469 (patch) | |
tree | fad3576de438be9ccd1786de7105a6db33545bba | |
parent | 245d31d62eab3a8daa7b04ce95a3564c5224add5 (diff) | |
download | accountsservice-a045e06a3c2d231f365f8e321036e2d56c73e469.tar.gz |
lib: don't try to update login frequency manually
The library will try to update the login frequency to 1 if the
requested user isn't finished asynchronously loading yet, but we
know they have an open session.
That no longer works, since we no longer track login-frequency
separately from the dbus proxy object.
This commit drops the code, since it's unnecessary anyway.
To be "on the safe side" we change the value returned for unloaded
users from 0 to 1. This is okay because the value is undefined
before the user is loaded anyway.
-rw-r--r-- | src/libaccountsservice/act-user-manager.c | 6 | ||||
-rw-r--r-- | src/libaccountsservice/act-user.c | 2 |
2 files changed, 1 insertions, 7 deletions
diff --git a/src/libaccountsservice/act-user-manager.c b/src/libaccountsservice/act-user-manager.c index 3c9ccac..9304ea6 100644 --- a/src/libaccountsservice/act-user-manager.c +++ b/src/libaccountsservice/act-user-manager.c @@ -1621,12 +1621,6 @@ maybe_add_new_session (ActUserManagerNewSession *new_session) } add_session_for_user (manager, user, new_session->id, is_ours); - - /* if we haven't yet gotten the login frequency - then at least add one because the session exists */ - if (act_user_get_login_frequency (user) == 0) { - _act_user_update_login_frequency (user, 1); - } } static void diff --git a/src/libaccountsservice/act-user.c b/src/libaccountsservice/act-user.c index e7ceb24..7162221 100644 --- a/src/libaccountsservice/act-user.c +++ b/src/libaccountsservice/act-user.c @@ -733,7 +733,7 @@ act_user_get_login_frequency (ActUser *user) g_return_val_if_fail (ACT_IS_USER (user), 0); if (user->accounts_proxy == NULL) - return 0; + return 1; return accounts_user_get_login_frequency (user->accounts_proxy); } |