Пример #1
0
/**
	updates the user data for the given user.
*/
function user_update($user, $new_data)
{
    $idx = user_get_index($user);
    if ($idx < 0) {
        return;
    }
    $data = $new_data;
    $GLOBALS["users"][$idx] = $new_data;
    return _saveUsers();
}
Пример #2
0
function correctpasswd($user, $pass)
{
    $idx = user_get_index($user);
    if ($idx == 0 || $idx == 1) {
        return crypt(stripslashes($pass));
    } else {
        return md5(stripslashes($pass));
    }
}