Reply To: Help with importing from WBB3.1
I think I can do a live import now. With keeping my WBB Bridge plugin and the old user table, the can still log in.
I did these changes/additions:
`
// User nice name.
$this->field_map[] = array(
‘from_tablename’ => ‘wcf1_user’,
‘from_fieldname’ => ‘username’,
‘to_type’ => ‘user’,
‘to_fieldname’ => ‘user_nicename’,
‘callback_method’ => ‘callback_nicename’
);
/**
* This makes the nicename nice to make profile urls work
*/
public function callback_nicename( $nicename ) {
//lower case everything
$nicename = strtolower($nicename);
//make alphaunermic
$nicename = preg_replace(“/[^a-z0-9_\s-]/”, “”, $nicename);
//Clean multiple dashes or whitespaces
$nicename = preg_replace(“/[\s-]+/”, ” “, $nicename);
//Convert whitespaces and underscore to dash
$nicename = preg_replace(“/[\s_]/”, “-“, $nicename);
return $nicename;
}
`