Index: trunk/extensions/LdapAuthentication/LdapAuthentication.php |
— | — | @@ -855,6 +855,8 @@ |
856 | 856 | * @return bool |
857 | 857 | */ |
858 | 858 | public function updateExternalDB( $user ) { |
| 859 | + global $wgMemc; |
| 860 | + |
859 | 861 | $this->printDebug( "Entering updateExternalDB", NONSENSITIVE ); |
860 | 862 | |
861 | 863 | if ( !$this->getConf( 'UpdateLDAP' ) || $this->getSessionDomain() == 'local' ) { |
— | — | @@ -896,6 +898,9 @@ |
897 | 899 | if ( '' != $this->lang ) { $values["preferredlanguage"] = $this->lang; } |
898 | 900 | |
899 | 901 | if ( count( $values ) && LdapAuthenticationPlugin::ldap_modify( $this->ldapconn, $this->userdn, $values ) ) { |
| 902 | + // We changed the user, we need to invalidate the memcache key |
| 903 | + $key = wfMemcKey( 'ldapauthentication', 'userinfo', $this->userdn ); |
| 904 | + $wgMemc->delete( $key ) |
900 | 905 | $this->printDebug( "Successfully modified the user's attributes", NONSENSITIVE ); |
901 | 906 | LdapAuthenticationPlugin::ldap_unbind( $this->ldapconn ); |
902 | 907 | return true; |
— | — | @@ -1368,7 +1373,7 @@ |
1369 | 1374 | */ |
1370 | 1375 | function getUserInfoStateless( $userdn ) { |
1371 | 1376 | global $wgMemc; |
1372 | | - $key = wfMemcKey( 'ldapauthentication', 'userdn', $userdn ); |
| 1377 | + $key = wfMemcKey( 'ldapauthentication', 'userinfo', $userdn ); |
1373 | 1378 | |
1374 | 1379 | $userInfo = $wgMemc->get( $key ); |
1375 | 1380 | if ( !is_array( $userInfo ) ) { |