Frontend\Modules\Profiles\Actions\ResetPassword::execute PHP Method

execute() public method

Execute the extra.
public execute ( )
    public function execute()
    {
        // get reset key
        $key = $this->URL->getParameter(0);
        // do we have an reset key?
        if (isset($key)) {
            // load parent
            parent::execute();
            // load template
            $this->loadTemplate();
            // get profile id
            $profileId = FrontendProfilesModel::getIdBySetting('forgot_password_key', $key);
            // have id?
            if ($profileId !== 0) {
                // load
                $this->loadForm();
                // validate
                $this->validateForm();
            } elseif ($this->URL->getParameter('sent') != 'true') {
                $this->redirect(FrontendNavigation::getURL(404));
            }
            // parse
            $this->parse();
        } else {
            $this->redirect(FrontendNavigation::getURL(404));
        }
    }