} else {
$notification->push(_("Your data were successfully updated."), 'horde.success');
if (empty($data['user_picture'])) {
$folks_driver->logActivity(_("Updated his/her profile details."));
} else {
$folks_driver->logActivity(_("Updated his/her profile picture."));
}
Horde::url('edit/edit.php')->redirect();
}
break;
case _("Delete picture"):
$result = $folks_driver->deleteImage($GLOBALS['registry']->getAuth());
if ($result instanceof PEAR_Error) {
$notification->push($result);
} else {
$notification->push(_("Your image was deleted successfully."), 'horde.success');
}
break;
}
} elseif (!$form->isSubmitted()) {
foreach ($profile as $key => $value) {
if ($key != 'user_picture' && !empty($value)) {
$vars->set($key, $value);
}
}
}
$page_output->header(array('title' => $title));
require FOLKS_TEMPLATES . '/menu.inc';
echo $tabs->render('edit');
$form->renderActive(null, null, null, 'post');
$page_output->footer();