That seems to work now, one failed logon attempt with my LDAP user creates the account and then I am able to enrol it on a module with my admin account. Do you know if it is possible to assign new users / LDAP users as administrators through the web interface? It is tricky to use without any icon images! Do you know where I could get hold of them? They seem to be missing from the package. Cheers ------ Alastair Hole <[log in to unmask]> Senior Educational Software and Systems Developer Learning and Teaching Enhancement Office University of Bath +44 (0)1225 383576 On 14 Jun 2013, at 16:33, Stephen P Vickers <[log in to unmask]> wrote: > Alastair, I've just taken a quick look at this code and, without having an LDAP server to test it against, I have two further suggestions which may be helpful in resolving your issue: > > 1. In the class_ldap_authenticator.php replace line 103: > > $id = $DAO->get_insert_id(); > > with: > > $sql = 'SELECT user_id FROM ' . APP__DB_TABLE_PREFIX . "user WHERE source_id = '' AND username = '{$this->username}'"; > $id = $DAO->fetch_value($sql); > > > 2. Ensure that the user is enrolled in at least one module - the current version of WebPA 2 does not permit a user to log in unless they have a role in at least one module. > > Stephen > > PS The change in 1. is in addition to the previous suggestion of removing line 90: > > 'user_type' => get_LDAP_user_type($info[0][LDAP__USER_TYPE_ATTRIBUTE]), > > > On 14/06/2013 14:38, Alastair Hole wrote: >> Hi, >> >> Hopefully someone can help, I'm having some problems installing WebPA 2.0.0.10. >> >> Following the instructions in install.txt: >> - enter a username of "admin" and a password of "admin" >> - change the password to something more secure after logging in >> >> Where would one change the admin password? >> >> Next, "- configure the LDAP settings if you wish to authenticate via LDAP." >> >> Firstly I was unable to bind to our directory until I modified includes/classes/class_ldap_authenticator.php:57 >> [log in to unmask] is not a valid DN for our directory, I had to modify the code to use: >> $user = "uid=".$this->username.",ou=people,o=bath.ac.uk"; >> then I was able to bind. >> >> The next problem was that the code was trying to insert into the user_type column of the user table, which didn't exist! I created it to no avail, I still get "Your username and password were rejected.". >> >> I am rather at a loss, before poring over the code I thought I'd see if anyone else has has similar issues. >> >> Is anyone else using 2.0.0.10? With LDAP? Which LDAP server software are you using? >> >> Any help gratefully received >> Thanks in advance >> Alastair Hole >> >> ------ >> Alastair Hole <[log in to unmask]> >> Senior Educational Software and Systems Developer >> Learning and Teaching Enhancement Office >> University of Bath >> +44 (0)1225 383576 >>