]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Correctly simulate AccountsService FindUserByName for users that are hidden
authorRobert Ancell <robert.ancell@canonical.com>
Thu, 7 Nov 2013 00:36:42 +0000 (13:36 +1300)
committerRobert Ancell <robert.ancell@canonical.com>
Thu, 7 Nov 2013 00:36:42 +0000 (13:36 +1300)
tests/src/test-runner.c

index 3297676ea259e3decc4da4dcd80661596ea9afca..ed39d114e8097b723a8de5c3c27099e713ba30cd 100644 (file)
@@ -1680,8 +1680,12 @@ handle_accounts_call (GDBusConnection       *connection,
 
         load_passwd_file ();
         user = get_accounts_user_by_name (user_name);
-        if (user && !user->hidden)
+        if (user)
+        {
+            if (user->hidden)
+                accounts_user_set_hidden (user, FALSE, TRUE);
             g_dbus_method_invocation_return_value (invocation, g_variant_new ("(o)", user->path));
+        }
         else
             g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "No such user: %s", user_name);
     }