Issue Details (XML | Word | Printable)

Key: MDL-16168
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Petr Skoda (frankenstein)
Reporter: Alan Elkner
Votes: 3
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Moodle CAS crashes if no LDAP is set up

Created: 22/Aug/08 07:47 AM   Updated: 03/Oct/09 01:58 AM
Component/s: Authentication
Affects Version/s: 1.9.2
Fix Version/s: None

File Attachments: 1. Text File cas_minus_ldap.patch (0.9 kB)

Environment: This was discovered using Moodle on an Ubuntu server, though I doubt the issue is related to the environment.

Database: MySQL
Participants: Alan Elkner, Johan Reinalda, Matthew Turney and Petr Skoda (frankenstein)
Security Level: None
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
After configuring CAS on a fresh Moodle install and updating the mdl_user table with:

update mdl_user set auth='cas';

we get successfully redirected on login to the CAS server and back to Moodle as we would expect.

However, it then returns an error about not being able to connect to the LDAP server. We aren't using LDAP, and we didn't configure Moodle to use LDAP, so that would be a bug.

The patch that we made to work around the bug was to comment out the calls to update_user_record and create_user_record that are found in lib/moodlelib.php. It would be better if Moodle recognized that we were not using LDAP and that it wouldn't try to update or create users in that case.



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Johan Reinalda added a comment - 12/Mar/09 06:32 AM
We are having the exact same issue trying to get CAS setup.
We are providing all user, course and enrollments via IMS to Moodle.

We would like to use CAS, but moodle needs an ldap config (fails without it). Witjhout editing source, we cannot accomplish this.

Johan

Thunderbird School of Global Management
www.thunderbird.edu


Matthew Turney added a comment - 03/Oct/09 01:57 AM
I solved this by adding an if statement that returns false if there is no LDAP host url. Attaching patch file from my GIT repo.

Matthew Turney added a comment - 03/Oct/09 01:58 AM
Here is the patch file that I generated from my hack to make CAS work without LDAP while still allowing LDAP to work if its configured.