private function parse()
{
// have the settings been saved?
if ($this->URL->getParameter('sent') == 'true') {
// show success message
$this->tpl->assign('updateSettingsSuccess', true);
}
// assign avatar
$avatar = $this->profile->getSetting('avatar');
if (empty($avatar)) {
$avatar = '';
}
$this->tpl->assign('avatar', $avatar);
// parse the form
$this->frm->parse($this->tpl);
// display name changes
$this->tpl->assign('maxDisplayNameChanges', FrontendProfilesModel::MAX_DISPLAY_NAME_CHANGES);
$this->tpl->assign('displayNameChangesLeft', FrontendProfilesModel::MAX_DISPLAY_NAME_CHANGES - $this->profile->getSetting('display_name_changes'));
}