Browse Source

Fix vpn model use username instead of ldap_cn

Fabs 10 years ago
parent
commit
c4dc5a66c8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      coin/vpn/models.py

+ 2 - 2
coin/vpn/models.py

@@ -117,8 +117,8 @@ class VPNConfiguration(CoinLdapSyncMixin, Configuration):
         # login should not contain any ".", because graphite uses "." as a
         # separator.
         if not self.login:
-            username = self.offersubscription.member.ldap_cn
-            vpns = VPNConfiguration.objects.filter(offersubscription__member__ldap_cn=username)
+            username = self.offersubscription.member.username
+            vpns = VPNConfiguration.objects.filter(offersubscription__member__username=username)
             # This is the list of existing VPN logins for this user.
             logins = [vpn.login for vpn in vpns]
             # 100 VPNs ought to be enough for anybody.