$profilesList = array_merge(array(array('id' => 0, 'text' => 'Choose Profile')), zen_get_profiles()); break; case 'password': // display unpopulated form for resetting existing user's password $formAction = 'reset'; break; case 'update': // update existing user's details in database. Post data is prep'd for db in the first function call $errors = zen_update_user(FALSE, $_POST['email'], $_POST['id'], $_POST['profile']); if (sizeof($errors) > 0) { foreach ($errors as $error) { $messageStack->add($error, 'error'); } $action = 'edit'; $formAction = 'update'; $profilesList = array_merge(array(array('id' => 0, 'text' => 'Choose Profile')), zen_get_profiles()); } else { $action = ''; $messageStack->add(SUCCESS_USER_DETAILS_UPDATED, 'success'); } break; case 'reset': // reset existing user's password in database. Post data is prep'd for db in the first function call $errors = zen_reset_password($_POST['user'], $_POST['password'], $_POST['confirm']); if (sizeof($errors) > 0) { foreach ($errors as $error) { $messageStack->add($error, 'error'); } $action = 'password'; $formAction = 'reset'; } else {
break; case 'update': zen_remove_profile_permits($profile); zen_insert_pages_into_profile($profile, $_POST['p']); $messageStack->add_session(SUCCESS_PROFILE_UPDATED, 'success'); zen_redirect(zen_href_link(FILENAME_PROFILES)); break; case 'update_name': zen_update_profile_name($profile, $_POST['profile-name']); $messageStack->add_session(SUCCESS_PROFILE_NAME_UPDATED, 'success'); zen_redirect(zen_href_link(FILENAME_PROFILES)); break; case 'rename': default: // if no specific action requested prepare the listing data $profileList = zen_get_profiles(TRUE); break; } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?> > <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?> "> <title><?php echo TITLE;