src/Graviton/SecurityBundle/Authentication/Strategies/CookieFieldStrategy.php
protected function extractAdUsername(Request $request, $value)
    {
        $pattern = "/((?m)(?<=\b".self::COOKIE_FIELD_NAME."=)[^;]*)/i";
        preg_match($pattern, $value, $matches);

        if ($matches) {
            $request->attributes->set(self::CONFIGURATION_PARAMETER_USER_ID, $matches[0]);

            return $matches[0];
        }

        return $value;
    }
protected function extractAdUsername(Request $request, $value)
    {
        $pattern = "/((?m)(?<=\b".self::COOKIE_FIELD_NAME."=)[^;]*)/i";
        preg_match($pattern, $value, $matches);

        if ($matches) {
            $request->attributes->set(self::CONFIGURATION_PARAMETER_USER_ID, $matches[0]);

            return $matches[0];
        }

        return $value;
    }
protected function extractAdUsername ( Request $ request , $ value ) { $ pattern = "/((?m)(?<=\b" . self :: COOKIE_FIELD_NAME . "=)[^;]*)/i" ; preg_match ( $ pattern , $ value , $ matches ) ; if ( $ matches ) { $ request -> attributes -> set ( self :: CONFIGURATION_PARAMETER_USER_ID , $ matches [ 0 ] ) ; return $ matches [ 0 ] ; } return $ value ; }
Finds and extracts the ad username from the cookie.

@param Request $request Request stack that controls the lifecycle of requests
@param string  $value   The string the value of self::COOKIE_FIELD_NAME shall be extracted from.

@return string
Finds and extracts the ad username from the cookie .