getUserData example


    public function validate($value, Constraint $constraint)
    {
        /** @var CurrentPassword $constraint */
        if (!$constraint instanceof CurrentPassword) {
            return;
        }

        $userData = $this->getUserData();
        if ($userData === null) {
            $this->context
                ->buildViolation('Could not find a customer account corresponding to the current session.')
                ->addViolation();

            return;
        }

        $passwordHash = $userData['password'];
        $encoderName = $userData['encoder'];

        

    }

    public function preDispatch()
    {
        $events = Shopware()->Container()->get('events');
        $events->addListener('Shopware_Modules_Admin_Payment_Fallback', [$this, 'flagPaymentBlocked']);

        $this->View()->setScope(Enlight_Template_Manager::SCOPE_PARENT);

        $this->View()->assign('sUserLoggedIn', $this->admin->sCheckUser());
        $this->View()->assign('sUserData', $this->getUserData());
    }

    /** * @deprecated in 5.6, will be protected in 5.8 * * Called if the sAdmin resets the selected customer payment to the shop preset * * @return void */
    public function flagPaymentBlocked()
    {
        
Home | Imprint | This part of the site doesn't use cookies.