/** * Prints a form to reset a password for a user * @param none */ function reset_password() { $user = new User($_GET['memberid']); // User object if (Auth::isAdmin() || $this->user->is_group_admin($user->get_groupids())) { print_reset_password($user); } else { print_not_allowed(); } }
* Copyright (C) 2003 - 2007 phpScheduleIt * License: GPL, see LICENSE */ include_once 'lib/Template.class.php'; include_once 'lib/Group.class.php'; include_once 'lib/User.class.php'; include_once 'lib/Utility.class.php'; include_once 'templates/usergroup.template.php'; $t = new Template(translate('Manage Groups')); $t->printHTMLHeader(); $t->startMain(); if (!isset($_POST['submit'])) { $user = new User($_GET['memberid']); $cur_user = new User(); $cur_user->userid = Auth::getCurrentID(); if (!Auth::isAdmin() && !$cur_user->is_group_admin($user->get_groupids())) { CmnFns::do_error_box(translate('This is only accessable to the administrator')); die; } print_edit((bool) $_GET['edit'] && Auth::isAdmin(), $user); } else { if (!Auth::isAdmin()) { CmnFns::do_error_box(translate('This is only accessable to the administrator')); die; } $to_add = isset($_POST['add_groups']) ? $_POST['add_groups'] : array(); update_groups($_POST['memberid'], $to_add); } $t->endMain(); $t->printHTMLFooter(); /**