本文整理匯總了PHP中AuthManager::deleteUser方法的典型用法代碼示例。如果您正苦於以下問題:PHP AuthManager::deleteUser方法的具體用法?PHP AuthManager::deleteUser怎麽用?PHP AuthManager::deleteUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AuthManager
的用法示例。
在下文中一共展示了AuthManager::deleteUser方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: UserManager
$new_password = request_isset("new_password");
$password = request_isset("password");
$userManager = new UserManager();
$authManager = new AuthManager();
switch ($page_action) {
case 'update_by_id':
//$db_update_success = $userManager->updateRecord ($id, $user_type, $username, $password);
$db_update_success = $authManager->updateRecord($id, $user_type, $username, $new_password);
break;
case "add_user":
//$userManager->addRecord($user_type, $username, $password);
$db_add_success = $authManager->addUser($user_type, $username, $password);
break;
case "delete_by_id":
//$userManager->deleteRecord ($id);
$db_delete_success = $authManager->deleteUser($id);
break;
}
$users_data = $userManager->getAllRecords();
$page_title = 'Manage users';
$alt_menu = '<a href="#" class="add">Add</a>';
$addView = new AddView('Add', 'add_user');
$addView->addOptionBox('user_type', 'User type', $usertype_options);
$addView->addRow('username', 'Username', null, 'eg. Neil');
$addView->addRow('password', 'Password', null, 'eg. Sm4rtH0uSe');
$tableView = new TableView(array('View', ''));
while (($users_row = mysql_fetch_array($users_data)) != null) {
$tableView->addRow(array(TableView::createCell('user_type', $users_row['user_type']), TableView::createCell('username', $users_row['username']), TableView::createEdit($users_row['USER_ID'])));
}
$views_to_load = array();
$views_to_load[] = '../../views/_add.php';