View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0012835 | mantisbt | ldap | public | 2011-03-03 17:54 | 2011-04-20 05:27 |
Reporter | Libra | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 1.2.4 | ||||
Summary | 0012835: Removal of Real Name in some cases (using LDAP login method) | ||||
Description | After upgrading version from 1.1.x to 1.2.4 discovered one unpleasant feature - if you going to edit form for user, whose account was deleted on the LDAP server, user Real Name will be cleared (this happens because Mantis try automatically update information from the LDAP, which was not in previous versions). I think it's not quite correct behavior of the system - the user can be deleted on the LDAP server (i.e. can't no longer login into the Mantis), but the story of his action in Mantis should be preserved. | ||||
Steps To Reproduce |
| ||||
Tags | No tags attached. | ||||
Attached Files | ldap_api.diff (510 bytes)
--- D:/Work/Mantis/Patches/Test/ldap_api.php.orig Sat Feb 26 17:41:25 2011 +++ D:/Work/Mantis/Patches/Test/ldap_api.php Fri Mar 04 01:36:39 2011 @@ -146,8 +146,8 @@ $t_ldap_realname_field = config_get( 'ldap_realname_field' ); $t_realname = ldap_get_field_from_username( $p_username, $t_ldap_realname_field ); - if ( $t_realname === null ) { - return ''; + if ( $t_realname === null ) { + return user_get_field(user_get_id_by_name($p_username), 'realname'); } return $t_realname; | ||||
To resolve this issue fairly when editing a user to keep its current name, rather than deleting it - created a small patch that solves this problem. |
|
I think this is duplicate of 0011351. |
|
I think that this is not the same. In my case the account missing in the LDAP server, so the function ldap_get_field_from_username always returns null value. |
|