[sysadmin-bin] Skip users who logged in with 2 or more identities



commit e83832dc74bbada0e313706241a9cbdc723fca0d
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Mon Oct 25 10:56:09 2021 +0200

    Skip users who logged in with 2 or more identities

 gitlab/inactive-gitlab-users.py | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gitlab/inactive-gitlab-users.py b/gitlab/inactive-gitlab-users.py
index 4a2976b..94a635a 100755
--- a/gitlab/inactive-gitlab-users.py
+++ b/gitlab/inactive-gitlab-users.py
@@ -126,6 +126,10 @@ def get_inactive_users(gl, timedelta_unit, timedelta_value):
         if user.keys.list() or user.gpgkeys.list():
             continue
 
+        # Skip users with at least two identities
+        if len(user.identities) >= 2:
+            continue
+
         if attrs["bio"] and len(attrs["bio"]) > 0:
             # Some users set URL in bio, check it against surbl
             if re.match("http[s]?://", attrs["bio"], re.IGNORECASE):


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