Ignore:
Timestamp:
26/11/10 20:47:50 (2 years ago)
Author:
Dererk <dererk@…>
Children:
4ff36b1676f8899d85c264278fbbd183afeff21f, 41f7476643cbd980932f209e85d50fc56529a327
Parents:
5c0fe8482f8ffbc92b3814afa47c79ee6fdb549a
git-committer:
Dererk <dererk@…> (26/11/10 20:47:50)
Message:

Chequea la existencia de un usuario (domainless):

  • Hoy goSA nos limita a no poder tener mas de un usuario con el mismo nick, aunque sean diferentes dominios :-@

Chequea slugs en FQDN y no-FQDN (cortos).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arma2/frontend/user.py

    r7c43132 r945ee71  
    2323    return False 
    2424         
    25 def checkIfUserExist(user): 
    26     """ Funcion interna para pre-validar la disponibilidad de un usuario tras el POST  
    27     """ 
    28     l=ldap.open(ldapSERVER) 
    29     # Compatibility mode, JIC ® 
    30     # l.protocol_version = ldap.VERSION2 
    31  
    32     # This might through an exception 
    33     try: 
    34         l.simple_bind("","") 
    35         return user.lower() in [entry[1]['uid'][0].lower() for entry in l.search_s(ldapBASE,2,'uid=*')]  
    36     except ldap.SERVER_DOWN: 
    37         # I'll do something interesting with this in the future... 
    38         return None 
    39     except: 
    40         return None 
Note: See TracChangeset for help on using the changeset viewer.