summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Vollmer <mvollmer@redhat.com>2013-06-18 09:34:44 +0300
committerRay Strode <rstrode@redhat.com>2013-10-15 16:13:59 -0400
commitfee34e4a5e5d752baf74e2f7065e2d953d652d35 (patch)
tree92b5a2c90cee7b22022ef3ab17d7cf4b5f1f66d2
parent9aefb5d811e7946d9e1074fc97f88aa4ddb64a56 (diff)
downloadaccountsservice-fee34e4a5e5d752baf74e2f7065e2d953d652d35.tar.gz
daemon: Emit "changed" signal when account type changes.
We currently emit the "changed" signal when most aspects of a user change, but we neglect to do it when the account type changes. This commit fixes that. https://bugs.freedesktop.org/show_bug.cgi?id=65846
-rw-r--r--src/user.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/user.c b/src/user.c
index 76cb470..1698eeb 100644
--- a/src/user.c
+++ b/src/user.c
@@ -165,6 +165,7 @@ user_update_from_pwent (User *user,
const gchar *passwd;
gboolean locked;
PasswordMode mode;
+ AccountType account_type;
g_object_freeze_notify (G_OBJECT (user));
@@ -223,7 +224,12 @@ user_update_from_pwent (User *user,
/* GID */
user->gid = pwent->pw_gid;
- user->account_type = account_type_from_pwent (pwent);
+ account_type = account_type_from_pwent (pwent);
+ if (account_type != user->account_type) {
+ user->account_type = account_type;
+ changed = TRUE;
+ g_object_notify (G_OBJECT (user), "account-type");
+ }
/* Username */
if (g_strcmp0 (user->user_name, pwent->pw_name) != 0) {