Skip to content

Commit

Permalink
fix user list empty issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed May 6, 2024
1 parent 4919104 commit 608d55e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/module/lightdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init_variables(self):
"New password:", "Retype new password:"]
self.__prompt_messages = ["Password:"]
# lists
self.__ulist = []
self.__ulist = None
self.__slist = None

def __init__(self):
Expand Down Expand Up @@ -223,12 +223,12 @@ def is_valid_user(self, name):
@cached
def get_user_list(self):
uids = []
if self.__ulist == []:
for u in LightDM.UserList.get_instance().get_users():
if u.get_uid() in uids or u.get_uid() < 1000:
continue
uids.append(u.get_uid())
self.__ulist.append(u)
self.__ulist = []
for u in LightDM.UserList.get_instance().get_users():
if u.get_uid() in uids or u.get_uid() < 1000:
continue
uids.append(u.get_uid())
self.__ulist.append(u)
return self.__ulist

def is_lockscreen(self):
Expand Down

0 comments on commit 608d55e

Please sign in to comment.