Problems with ldap user sync database error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Unassigned | ||
17.04 |
Fix Released
|
High
|
Unassigned | ||
17.10 |
Fix Released
|
High
|
Unassigned | ||
18.04 |
Fix Released
|
High
|
Unassigned | ||
18.10 |
Fix Released
|
High
|
Unassigned |
Bug Description
When trying to use the LDAP user_sync() function there is this error
[DBG] a0 (lib/dml.php:157) mysqli error: [1171: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead] in EXECUTE("CREATE TEMPORARY TABLE auth_ldap_
[DBG] a0 (lib/dml.php:157) extusername VARCHAR(64) DEFAULT NULL,
[DBG] a0 (lib/dml.php:157) firstname TEXT,
[DBG] a0 (lib/dml.php:157) lastname TEXT,
[DBG] a0 (lib/dml.php:157) email VARCHAR(255) DEFAULT NULL,
[DBG] a0 (lib/dml.php:157) studentid TEXT,
[DBG] a0 (lib/dml.php:157) preferredname TEXT,
[DBG] a0 (lib/dml.php:157) CONSTRAINT PRIMARY KEY (extusername)
[DBG] a0 (lib/dml.php:157) )ENGINE=innodb")
It looks like we need to make the 'extusername' column a not null column
This relates to the problem reported in https:/ /mahara. org/interaction /forum/ topic.php? id=8343& offset= 0&limit= 10#post33323