[gdm] Don't set login frequency if user isn't loaded



commit f37b24dae61e12cf79b655ec2f1cb2b8da769eee
Author: William Jon McCann <jmccann redhat com>
Date:   Fri Jun 11 12:43:57 2010 -0400

    Don't set login frequency if user isn't loaded

 gui/simple-greeter/gdm-user-manager.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-user-manager.c b/gui/simple-greeter/gdm-user-manager.c
index f4b09d3..1d2ae87 100644
--- a/gui/simple-greeter/gdm-user-manager.c
+++ b/gui/simple-greeter/gdm-user-manager.c
@@ -988,10 +988,12 @@ maybe_add_session (GdmUserManager *manager,
         }
 
         user = gdm_user_manager_get_user (manager, pwent->pw_name);
-        if (user != NULL) {
-                add_session_for_user (manager, user, session_id);
+        if (user == NULL) {
+                return;
         }
 
+        add_session_for_user (manager, user, session_id);
+
         /* if we haven't yet gotten the login frequency
            then at least add one because the session exists */
         if (gdm_user_get_login_frequency (user) == 0) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]