function wfEditBasicProfileData($user_obj, $data)
{
    global $wgUser;
    if ($user_obj == $wgUser) {
        //if the logged in user changes his data himself
        $usr = SSPUser::getInstance();
    } elseif ($wgUser->isAllowed("editinterface")) {
        //if the data is changed by administrator
        $usr = SSPAdmin::getProfile($user_obj->getName());
    } else {
        return false;
    }
    $usr->setName($data['up_name']);
    $usr->setEmail($data['up_email']);
    $usr->setCity($data['up_location_city']);
    $usr->setState($data['up_location_state']);
    $usr->setCountry($data['up_location_country']);
    $usr->setHomeCity($data['up_hometown_city']);
    $usr->setHomeState($data['up_hometown_state']);
    $usr->setHomeCountry($data['up_hometown_country']);
    $usr->setBirthday($data['up_birthday']);
    $usr->setAboutMe($data['up_about']);
    $usr->setOccupation($data['up_occupation']);
    $usr->setSchools($data['up_schools']);
    $usr->setPlaces($data['up_places_lived']);
    $usr->setWebsites($data['up_websites']);
    $usr->save();
    return true;
}
 function wfSynchronize()
 {
     $dbr = wfGetDB(DB_SLAVE);
     $res = $dbr->select('user', array('user_name'), 'user_id > 0', __METHOD__);
     $text = array();
     foreach ($res as $row) {
         $nm = $row->user_name;
         try {
             $au = SSPAdmin::getProfile($nm);
             $au->syncWithDB();
             $au->syncRelationshipList();
             $au->save();
         } catch (SocProfException $e) {
             $this->_output->addWikiText($e->__toString());
             return false;
         }
         $text[] = Title::makeTitle(NS_USER, $nm);
     }
     $this->_output->addWikiText("''' " . wfMsg('ssp-syncdone') . " '''");
     $list = '[[' . implode(']], [[', $text) . ']]';
     $this->_output->addWikiText($list);
     return true;
 }