X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=UDLdap.py;h=74313b20008277da1b542b6a37ff096672d21059;hb=81d4f79a7431c4061147f3ed1c1c17c2d38ed4eb;hp=9f8a0fd7375a05f88c9f0cfe12ecb558d42a290f;hpb=6171f9991eb458001488b215a09d34231d5890d4;p=mirror%2Fuserdir-ldap.git diff --git a/UDLdap.py b/UDLdap.py index 9f8a0fd..74313b2 100644 --- a/UDLdap.py +++ b/UDLdap.py @@ -66,6 +66,9 @@ class Account: def numkeys(self): return len(self['keyFingerPrint']) + def is_active_user(self): + return self['accountStatus'] == 'active' and self.numkeys() != 0 + def latitude_dec(self, anonymized=False): return userdir_ldap.DecDegree(self['latitude'], anonymized) def longitude_dec(self, anonymized=False):