Public bug reported:

Hi

  It really does not make sense to display more than 10 local users on
system. Personally , unity-greeter should auto-enable manual user hint,
and limit the no of users to a sane no ( for me , this is 10 ).

from

 === modified file 'src/unity-greeter.vala'
--- a/src/unity-greeter.vala    2012-04-18 17:21:34 +0000
+++ b/src/unity-greeter.vala    2012-07-18 16:35:22 +0000

             user_list.always_show_manual = greeter.show_manual_login_hint;
             if (!greeter.hide_users_hint)
             {
+               int i = 0;
                 var users = LightDM.UserList.get_instance ();
                 users.user_added.connect (user_added_cb);
                 users.user_changed.connect (user_added_cb);
                 users.user_removed.connect (user_removed_cb);
-                foreach (var user in users.users)
-                    user_added_cb (user);
+                foreach (var user in users.users) {
+                   if (i++ < sane_no_of_users_to_list ) 
+                      user_added_cb (user);
+                    else {
+                      warning ("breaking out ,after limiting users");  // way 
too many users in list, abort mission
+                      user_list.always_show_manual = true;
+                      break;
+                    }
+                }
             }
 
             if (greeter.has_guest_account_hint)


reference:

systems can have large no of users locally on system
https://bugs.launchpad.net/ubuntu/+source/accountsservice/+bug/941673

** Affects: unity-greeter (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1026643

Title:
  limit no of users display on unity-greeter list

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity-greeter/+bug/1026643/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to