本文整理匯總了PHP中AuthManager::addUser方法的典型用法代碼示例。如果您正苦於以下問題:PHP AuthManager::addUser方法的具體用法?PHP AuthManager::addUser怎麽用?PHP AuthManager::addUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AuthManager
的用法示例。
在下文中一共展示了AuthManager::addUser方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: UserManager
require_once 'usertypes.php';
$id = request_isset("id");
$user_type = request_isset("user_type");
$username = request_isset("username");
$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) {