Ejemplo n.º 1
0
/**
  this function removes the user with the given user name from the
  user database.
*/
function user_remove($user)
{
    // Copy Valid Users
    $cnt = count($GLOBALS["users"]);
    for ($i = 0; $i < $cnt; ++$i) {
        if ($GLOBALS["users"][$i][0] != $user) {
            $save_users[] = $GLOBALS["users"][$i];
        }
    }
    $GLOBALS["users"] = $save_users;
    return _saveUsers();
}
Ejemplo n.º 2
0
/**
  this function removes the user with the given user name from the
  user database.
*/
function user_remove($user)
{
    $data =& user_find($user, NULL);
    if ($data == NULL) {
        return false;
    }
    // Remove
    $data = NULL;
    // Copy Valid Users
    $cnt = count($GLOBALS["users"]);
    for ($i = 0; $i < $cnt; ++$i) {
        if ($GLOBALS["users"][$i] != NULL) {
            $save_users[] = $GLOBALS["users"][$i];
        }
    }
    $GLOBALS["users"] = $save_users;
    return _saveUsers();
}