Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We recently upgraded MediaWiki from 1.13.2 to 1.15.4. One of the side effects is that people's signatures are automatically deleted. That is, a signature added under MY PREFERENCES gets changed to match the Real Name field after a couple of minutes.

We set $wgCleanSignatures = false in LocalSettings.php but this does not change the behaviour.

Does anyone know how to prevent this?

Update: it might help to add some more details.


[[User:MyName|<span style="color:lightseagreen">My Name</span>]] ([[User talk:MyName|<span style="color:lightseagreen">Talk</span>]])

My signature on a talk page is therefore:

--[[User:MyName|<span style="color:lightseagreen">My Name</span>]] ([[User talk:MyName|<span style="color:lightseagreen">Talk</span>]]) <time date stamp>

After one hour, the preference reverts to:

My Name

And my signature becomes:

--My Name <time date stamp>
share|improve this question
Are you using external authentication by chance, such as ldap? – pablo Mar 16 '11 at 11:38
@pablo - yes! But this has not changed since the upgrade. We modified LDAP log in so that people do not get a log in screen but automatically get a new user made when they first log in to the wiki. – Wikis Mar 16 '11 at 11:42

This should an issue with using external authentication. When a user logs in it updates their attributes, and I am guessing during this process during the upgrade it is also updating the users signature, modify your code as needed.

You can see from the below how it updates.

Also check here, there is some chat about if you are using auto login it looks like signature is updated with username, youll need to mod the code.

In LdapAuthentication.php

 * When a user logs in, update user with information from LDAP.
 * @param User $user
 * @access public
 * TODO: fix the setExternalID stuff
function updateUser( &$user ) {
    global $wgLDAPRetrievePrefs;
    global $wgLDAPUseLDAPGroups;
    global $wgLDAPUniqueBlockLogin, $wgLDAPUniqueRenameUser;

    $this->printDebug( "Entering updateUser", NONSENSITIVE );

    if ($this->authFailed) {
        $this->printDebug( "User didn't successfully authenticate, exiting.", NONSENSITIVE );

    $saveSettings = false;

    //If we aren't pulling preferences, we don't want to accidentally
    //overwrite anything.
    if ( isset( $wgLDAPRetrievePrefs[$_SESSION['wsDomain']] ) && $wgLDAPRetrievePrefs[$_SESSION['wsDomain']] ) {
        $this->printDebug( "Setting user preferences.", NONSENSITIVE );

        if ( '' != $this->lang ) {
            $user->setOption( 'language', $this->lang );
        if ( '' != $this->nickname ) {
            $user->setOption( 'nickname', $this->nickname );
        if ( '' != $this->realname ) {
            $user->setRealName( $this->realname );
        if ( '' != $this->email ) {
            $user->setEmail( $this->email );
        if ( ( isset( $wgLDAPUniqueBlockLogin[$_SESSION['wsDomain']] ) && $wgLDAPUniqueBlockLogin[$_SESSION['wsDomain']] )
            || ( isset( $wgLDAPUniqueRenameUser[$_SESSION['wsDomain']] ) && $wgLDAPUniqueRenameUser[$_SESSION['wsDomain']] ) ) {

            if ( '' != $this->externalid ) {
                $user->setExternalID( $this->externalid );

        $saveSettings = true;

    if ( isset( $wgLDAPUseLDAPGroups[$_SESSION['wsDomain']] ) && $wgLDAPUseLDAPGroups[$_SESSION['wsDomain']] ) {
        $this->printDebug( "Setting user groups.", NONSENSITIVE );
        $this->setGroups( $user );

        $saveSettings = true;

    if ( $saveSettings ) {
        $this->printDebug( "Saving user settings.", NONSENSITIVE );
share|improve this answer
@pablo - you might be on to something here. Our authentication is re-checked every hour or so, so this must be the reason. But I don't know what to do with the information you've provided. – Wikis Mar 16 '11 at 13:51
can you paste your ldapauthentication.php source code somewhere like – pablo Mar 16 '11 at 14:32
@pablo - will do but cannot right now - in 24 hours. Should I be looking for any particular part? – Wikis Mar 16 '11 at 18:05
look at the function above and see if you see something about signature, if you paste the whole thing somewhere i can have a look. – pablo Mar 16 '11 at 18:34
@pablo - done great tip to use pastebin, thanks! BTW - this is an additional file - the MediaWiki LDAP files are not changed. – Wikis Mar 17 '11 at 13:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.