本文整理汇总了PHP中Accounts::updateUser方法的典型用法代码示例。如果您正苦于以下问题:PHP Accounts::updateUser方法的具体用法?PHP Accounts::updateUser怎么用?PHP Accounts::updateUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Accounts
的用法示例。
在下文中一共展示了Accounts::updateUser方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
/** // Check igcmds_rights
if(!in_array($_POST['igcmds_rights'], range(0,100))) {
$errors[] = $lang['tool_igcmds_err1'];
} */
// The user cannot delete his own superadmin rights
if ($userInfo['user_id'] == $user['user_id'] && $_POST['fr2'] == 'no') {
$errors[] = $lang['tool_acc_err7'];
}
// Check errors and stuff
if (count($errors) == 0) {
$vars = array('user_name' => $_POST['name'], 'user_username' => strtolower($_POST['username']), 'rights_ingameadmin' => $_POST['fr1'], 'rights_superadmin' => $_POST['fr2'], 'rights_rcon' => $_POST['fr3'], 'rights_blacklist' => $_POST['fr4'], 'rights_server' => $_POST['fr6'], 'rights_logs' => $_POST['fr9']);
if (!empty($_POST['password'])) {
$vars['user_password'] = hash('sha256', $_POST['password']);
}
$result = $acc->updateUser($user['user_id'], $vars);
if ($result == 'OK') {
$status = '<div class="alert alert-success alert-block"><h4><i class="fa fa-check"></i> ' . $lang['word_ok'] . '</h4><p>' . $lang['msg_settings_saved'] . '</p></div>';
$log->insertActionLog($userInfo['user_id'], 'User ' . strtolower($_POST['username']) . ' edited');
$user = $acc->fetchUser($_GET['id']);
$user = $user['user'];
} else {
$status = '<div class="alert alert-danger alert-block"><h4><i class="fa fa-times"></i> ' . $lang['word_error'] . '</h4><p>' . $result . '</p></div>';
}
} else {
$status = '<div class="alert alert-danger alert-block"><h4><i class="fa fa-times"></i> ' . $lang['word_error'] . '</h4><p>' . $lang['msg_error'] . '</p><ul><li>' . implode('</li><li>', $errors) . '</li></ul></div>';
}
}
?>
<div class="row">