View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0014673 | mantisbt | ldap | public | 2012-08-30 08:27 | 2014-09-23 18:05 |
Reporter | rombert | Assigned To | rombert | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.11 | ||||
Target Version | 1.2.12 | Fixed in Version | 1.2.12 | ||
Summary | 0014673: LDAP login performs unnecessary SQL updates | ||||
Description | When a user is authenticated using LDAP, the following information is updated in the mantis_user_table <ol><li>password</li><li>realname</li><li>email</li></ol> The updates are done in 3 distinct SQL calls. We should either <ol><li>batch the three updates in one single SQL call OR</li><li>load the user ( as we call user_get_id_by_name anyway ) and run the updates only if changes are found</li></ol> | ||||
Tags | No tags attached. | ||||
There are a lot of improvements and fixes needed in the LDAP area ;-) Paul was working on that at some point, but as he's now focusing on his "2.0" branch I'm not sure any of what he implemented is ever going to make it into 1.2 or even 1.3... you may want to take a look at his branch on github. IMO The specific issue you mention is a consequence (or limitation) of the user API which does not offer primitives to update several fields at once. We should not have SQL updating the user table in the LDAP API. It may however be an idea to have a new function - or maybe revise user_set_field() - to accept an array of fields/values. I'm sure there are several other places where this could come in handy. |
|
I've added a new user_set_fields API call which helps with this performance problem. |
|
Exactly what I had in mind. Thanks Robert. |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT: master bb676ff4 2012-08-30 11:11 Details Diff |
ldap_api: use only one SQL call to update user profile Fixes 0014673: LDAP login performs unnecessary SQL updates |
Affected Issues 0014673 |
|
mod - core/ldap_api.php | Diff File | ||
MantisBT: master-1.2.x ab63d69a 2012-08-30 11:11 Details Diff |
ldap_api: use only one SQL call to update user profile Fixes 0014673: LDAP login performs unnecessary SQL updates |
Affected Issues 0014673 |
|
mod - core/ldap_api.php | Diff File |