Error with auth_ldap_sync_cron

Bug #1705547 reported by Gilles-Philippe Leblanc
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Gilles-Philippe Leblanc
17.04
Fix Released
High
Unassigned
17.10
Fix Released
High
Gilles-Philippe Leblanc

Bug Description

We have this error in our log :
[WAR] eb (auth/ldap/lib.php:1627) Undefined property: stdClass::$active

The cause is the the db record do not contain "active":
$auths = get_records_array('auth_instance', 'authname', 'ldap', 'id', 'id');

It can be fixed by adding it :
$auths = get_records_array('auth_instance', 'authname', 'ldap', 'id', 'id,active');

I think its a regression caused by :
Bug 1640308: Adding an auth_instance "active" column

summary: - Synchronize users
+ Error with auth_ldap_sync_cron
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/7891

Revision history for this message
Gilles-Philippe Leblanc (gilles-philippe-leblanc) wrote :

I just give you the patch.

To reproduce and to test, you must have a ldap auth instance in your system (in the table mhr_auth_instance)

At 0:00, if you run the cron, you will have it.
You can change the value temporarily for the test in get_cron() from the file auth/ldap/lib.php

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/7892

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7892
Committed: https://git.mahara.org/mahara/mahara/commit/b163548fd10848afeb3ffeff23ecc3cbf508e806
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit b163548fd10848afeb3ffeff23ecc3cbf508e806
Author: Gilles-Philippe Leblanc <email address hidden>
Date: Thu Jul 20 22:12:19 2017 -0400

Bug 1705547: Fix for error with auth_ldap_sync_cron

behatnotneeded
Change-Id: Ib51cd670a4cebee9756b896ec83ef26c9a5f5d85

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "17.04_STABLE" branch: https://reviews.mahara.org/7958

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7958
Committed: https://git.mahara.org/mahara/mahara/commit/a976a10918397642d3fe73b21c16189a43f4f5e4
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.04_STABLE

commit a976a10918397642d3fe73b21c16189a43f4f5e4
Author: Gilles-Philippe Leblanc <email address hidden>
Date: Thu Jul 20 22:12:19 2017 -0400

Bug 1705547: Fix for error with auth_ldap_sync_cron

behatnotneeded
Change-Id: Ib51cd670a4cebee9756b896ec83ef26c9a5f5d85
(cherry picked from commit b163548fd10848afeb3ffeff23ecc3cbf508e806)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.