Exemplo n.º 1
0
<?php
header("Expires: Fri, 01 Jan 2010 05:00:00 GMT");
header("Cache-Control: no-cache");
header("Pragma: no-cache");

echo SecurityTool::getUserToken();
eZExecution::cleanExit();
    /**
     * @return bool
     */
    public function htmlBuildResult()
    {
        $this->pushResult( 'application_headline', $this->applicationLocalized()->headline );
        $this->pushResult( 'token', SecurityTool::getUserToken() );

        return true;
    }
 /**
  * @return string
  */
 public static function getUserToken()
 {
     return SecurityTool::getUserToken();
 }
    /**
     * Fetch user information to fill in the my account form
     *
     * @return array
     */
    public function form()
    {
        $parameters = $this->getFormParameters();
        $result = $this->trimESBString( $this->callWSHandler( $this->getEsbInterface( 'read' ), $parameters ) );
        $result = $this->getSubsResults($result);

        //set Token on form
        if(SolrSafeOperatorHelper::featureIsActive('UUMP'))
        {
            $result['data']['profile']['Token'] = SecurityTool::getUserToken();
        }
        else
        {
            $result['Data']['Params']['Token'] = SecurityTool::getUserToken();
        }

        $formatDate          = SolrSafeOperatorHelper::clusterIni('EsbDateConvert', 'FormatDate', 'merck.ini' );
        $availableDateParams = SolrSafeOperatorHelper::clusterIni('EsbDateConvert', 'AvailableDateParams', 'merck.ini' );
        if ( $this instanceof ServiceUserUUMP && !empty( $availableDateParams ) )
        {
            foreach ( $result['data']['profile'] as $key => $value )
            {
                if( isset( $availableDateParams[$key] ) && !empty($value) )
                {
                    $result['data']['profile'][$key] = $this->convertDateforUUMP( $value, $formatDate, true );
                }
            }
        }

        if(SolrSafeOperatorHelper::featureIsActive('UUMP'))
        {
            if (self::isAddressEncodeAllowedOnCluster())
            {
                $result['data']['profile']['addressLine1'] = html_entity_decode($result['data']['profile']['addressLine1'], ENT_QUOTES, 'UTF-8');
                $result['data']['profile']['addressLine2'] = html_entity_decode($result['data']['profile']['addressLine2'], ENT_QUOTES, 'UTF-8');
            }
        }
        else
        {
            if (self::isAddressEncodeAllowedOnCluster())
            {
                $result['Data']['Params']['Address_Line_1'] = html_entity_decode($result['Data']['Params']['Address_Line_1'], ENT_QUOTES, 'UTF-8');
                $result['Data']['Params']['Address_Line_2'] = html_entity_decode($result['Data']['Params']['Address_Line_2'], ENT_QUOTES, 'UTF-8');
            }
        }

        return $result;
    }