defender::remove_token PHP Method

remove_token() public method

public remove_token ( )
    public function remove_token()
    {
        global $defender;
        if ($defender->safe() && !empty($_POST['form_id']) && $this->tokenIsValid) {
            $tokens = $_SESSION['csrf_tokens'][self::pageHash()][$_POST['form_id']];
            $current_token = reset($tokens);
            if ($this->recycled_token && $this->recycled_token !== $current_token) {
                array_shift($tokens);
            }
        }
    }