Forums | Mahara Community
Support
/
Create groups with linux ldap
14 November 2018, 1:36
Hi, i use a LDAP from a linux server.
No problem to create users from it into Mahara.
But when i want to create automatic groups, i've this log :
- log_message("Undefined variable: USER", 8, true, true, "/home/www/mahara/lib/group.php", 419) at /home/www/mahara/lib/errors.php:520
- error(8, "Undefined variable: USER", "/home/www/mahara/lib/group.php", 419, array(size 3)) at /home/www/mahara/lib/group.php:419
- group_create(array(size 15)) at /home/www/mahara/auth/ldap/lib.php:1498
- AuthLdap->sync_groups() at /home/www/mahara/auth/ldap/lib.php:1646
- PluginAuthLdap::auth_ldap_sync_cron() at /home/www/mahara/lib/mahara.php:1813
- call_static_method("PluginAuthLdap", "auth_ldap_sync_cron") at /home/www/mahara/lib/cron.php:115
- exception(object(Error)) at Unknown:0
Here are my settings
---------------------------------
Synchronise LDAP Object : yes
Classe Group : PosixGroup
Group attribute : CN
Member group attribute : memberUid
What is the problem ?
Thanks.
14 November 2018, 10:55
Hi Jonathan
Thank you for reporting this bug - I've filed a report for it and have added a patch
https://reviews.mahara.org/#/c/9308/2
Are you able to edit your site / apply the change to see if that fixes the problem?
Cheers
Robert
14 November 2018, 11:39
it seems to have another problem now
Here are the logs :
- group_update_members(4, array(size 102)) at /home/www/mahara/auth/ldap/lib.php:1532
- AuthLdap->sync_groups() at /home/www/mahara/auth/ldap/lib.php:1646
- PluginAuthLdap::auth_ldap_sync_cron() at /home/www/mahara/lib/mahara.php:1813
- call_static_method("PluginAuthLdap", "auth_ldap_sync_cron") at /home/www/mahara/lib/cron.php:115
16 November 2018, 13:48
Hi Jonathan,
On line 1518 of htdocs/auth/ldap/lib.php there is the line:
$members = array('1' => 'admin'); //must be set otherwise fatal error group_update_members: no group admins listed for group
- that is the error you are getting
Then on line 1523 it has
$members[$id] = 'member';
So if $id = 1 it will set the 'admin' to 'member'
Are you able to check the array of $members just before line 1532 to see what it contains and to see if that is what is happening?
Adding a:
log_debug($members);
should help - the output should end up in error logs
If it is I'll see if I can create a patch to fix this problem
Cheers
Robert
16 November 2018, 19:20
Hi,
my logs now :
[DBG] 00 (auth/ldap/lib.php:1531) Array
(
[1] => member
[4275] => member
[4276] => member
[4277] => member
[4278] => member
[4279] => member
[4281] => member
........
25 November 2018, 8:52
Hi Jonathan
I've created a patch that makes sure at least 1 member is the group admin
https://reviews.mahara.org/#/c/9333/1
Are you able to edit your site / apply the change to see if that fixes the problem?
Cheers
Robert
25 November 2018, 10:12
Great Robert ! It works ! Many thanks.
Now i have an other error in https://mahara.kerplouz.com/, can you see it ?
25 November 2018, 13:00
I can see the logged out homepage for the site but no error messages?
What is the error?
- «Previous page
- 1
- 2
- »Next page