It's known issue and fixed version is in trunk. http://code.google.com/p/web2py/issues/detail?id=565&can=1&q=ldap
On Feb 7, 12:53 pm, Ialejandro <[email protected]> wrote: > Hi!! I have a lot of apps running with Windows LDAP and web2py (1.8) > and everything works just fine. Now I'm trying to build an app from > scratch using the same auth method with web2py 1.99.4. But it doesn't > work. When I try to log in (after typing pass and username) I get a > ticket this is what it says: > > Traceback (most recent call last): > File "C:\web2py\web2py\gluon\restricted.py", line 204, in restricted > exec ccode in environment > File "C:/web2py/web2py/applications/fivrgen/controllers/default.py", > line 61, in <module> > File "C:\web2py\web2py\gluon\globals.py", line 172, in <lambda> > self._caller = lambda f: f() > File "C:/web2py/web2py/applications/fivrgen/controllers/default.py", > line 22, in user > return dict(form=auth()) > File "C:\web2py\web2py\gluon\tools.py", line 1141, in __call__ > return getattr(self,args[0])() > File "C:\web2py\web2py\gluon\tools.py", line 1744, in login > request.vars[passfield]): > File "C:\web2py\web2py\gluon\contrib\login_methods\ldap_auth.py", > line 92, in ldap_auth_aux > if not isinstance(result, dict): > UnboundLocalError: local variable 'result' referenced before > assignment > > And this is how my code looks: > > from gluon.contrib.login_methods.ldap_auth import ldap_auth > auth.settings.login_methods.append(ldap_auth(mode='ad', > server='myworkingserver', > base_dn='ou=xx,dc=xx,dc=xx,dc=xx,dc=xx')) > > auth.settings.actions_disabled=['register','change_password','request_reset > _password','retrieve_username','profile'] > > ## create all tables needed by auth if not custom tables > auth.define_tables(username = True) > > Am I doing something wrong??

