rename module methods in extended OXID classes to prevent conflicts with other modules

This commit is contained in:
Daniel Seifert 2022-11-09 11:21:09 +01:00
parent 8fccae9412
commit 4c29245ddb
Signed by: DanielS
GPG Key ID: 8A7C4C6ED1915C6F
2 changed files with 9 additions and 17 deletions

View File

@ -70,7 +70,7 @@ class d3_webauthn_UserComponent extends d3_webauthn_UserComponent_parent
$this->getParent()->getViewConfig()->getNavFormParams() $this->getParent()->getViewConfig()->getNavFormParams()
); );
$sUrl = $this->getConfig()->getShopHomeUrl() . 'cl=d3webauthnlogin'; $sUrl = Registry::getConfig()->getShopHomeUrl() . 'cl=d3webauthnlogin';
Registry::getUtils()->redirect($sUrl, true, 302); Registry::getUtils()->redirect($sUrl, true, 302);
} }
} }
@ -86,14 +86,6 @@ class d3_webauthn_UserComponent extends d3_webauthn_UserComponent_parent
return oxNew(Webauthn::class); return oxNew(Webauthn::class);
} }
/**
* @return UtilsView
*/
public function d3GetUtilsView(): UtilsView
{
return Registry::getUtilsView();
}
public function d3CancelWebauthnLogin(): void public function d3CancelWebauthnLogin(): void
{ {
$this->d3WebauthnClearSessionVariables(); $this->d3WebauthnClearSessionVariables();
@ -104,16 +96,16 @@ class d3_webauthn_UserComponent extends d3_webauthn_UserComponent_parent
*/ */
public function d3WebauthnClearSessionVariables(): void public function d3WebauthnClearSessionVariables(): void
{ {
$this->d3GetSession()->deleteVariable(WebauthnConf::WEBAUTHN_SESSION_CURRENTCLASS); $this->d3WebauthnGetSession()->deleteVariable(WebauthnConf::WEBAUTHN_SESSION_CURRENTCLASS);
$this->d3GetSession()->deleteVariable(WebauthnConf::WEBAUTHN_SESSION_CURRENTUSER); $this->d3WebauthnGetSession()->deleteVariable(WebauthnConf::WEBAUTHN_SESSION_CURRENTUSER);
$this->d3GetSession()->deleteVariable(WebauthnConf::WEBAUTHN_SESSION_NAVFORMPARAMS); $this->d3WebauthnGetSession()->deleteVariable(WebauthnConf::WEBAUTHN_SESSION_NAVFORMPARAMS);
$this->d3GetSession()->deleteVariable(WebauthnConf::WEBAUTHN_LOGIN_OBJECT); $this->d3WebauthnGetSession()->deleteVariable(WebauthnConf::WEBAUTHN_LOGIN_OBJECT);
} }
/** /**
* @return Session * @return Session
*/ */
public function d3GetSession(): Session public function d3WebauthnGetSession(): Session
{ {
return Registry::getSession(); return Registry::getSession();
} }
@ -144,8 +136,8 @@ class d3_webauthn_UserComponent extends d3_webauthn_UserComponent_parent
// relogin, don't extract from this try block // relogin, don't extract from this try block
$setSessionCookie = Registry::getRequest()->getRequestParameter('lgn_cook'); $setSessionCookie = Registry::getRequest()->getRequestParameter('lgn_cook');
$this->d3GetSession()->setVariable(WebauthnConf::WEBAUTHN_SESSION_AUTH, $credential); $this->d3WebauthnGetSession()->setVariable(WebauthnConf::WEBAUTHN_SESSION_AUTH, $credential);
$this->d3GetSession()->setVariable('usr', $user->getId()); $this->d3WebauthnGetSession()->setVariable('usr', $user->getId());
$this->setUser(null); $this->setUser(null);
$this->setLoginStatus(USER_LOGIN_SUCCESS); $this->setLoginStatus(USER_LOGIN_SUCCESS);

View File

@ -201,7 +201,7 @@ class Events
) )
) )
->setMaxResults(1); ->setMaxResults(1);
return $qb->execute()->fetchOne(); return (bool) $qb->execute()->fetchOne();
} }
/** /**