Skip to content

Commit

Permalink
Fixed UTF8 user names with SMF
Browse files Browse the repository at this point in the history
  • Loading branch information
jdarwood007 committed May 25, 2014
1 parent 2d168b4 commit f248ca1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Auth_SMF.php
Expand Up @@ -988,6 +988,9 @@ public function connect()
// Check if we were able to select the database.
if (!$db_selected)
$this->mysqlerror("SMF was unable to connect to the database.<br />\n");

// As of now, we don't suport anything other than UTF8 with SMF.
mysql_query('SET NAMES UTF8', $this->conn);
}

/**
Expand Down Expand Up @@ -1038,7 +1041,7 @@ function wfProfileSMFID($user, &$saveOptions)
global $ID_MEMBER;

// Preserve our member id.
if (empty($saveOptions['smf_member_id']))
if (empty($saveOptions['smf_member_id']) && !empty($user->mOptionOverrides['smf_member_id']))
$saveOptions['smf_member_id'] = $user->mOptionOverrides['smf_member_id'];

// Still empty, maybe we can save the day.
Expand Down

0 comments on commit f248ca1

Please sign in to comment.