application/models/bestitamazonpay4oxid.php
public function cleanUpUnusedAccounts()
    {
        $sTable = getViewName('oxuser');
        $sSql = "SELECT oxid, oxusername
            FROM {$sTable}
            WHERE oxusername LIKE '%-%-%@amazon.com'
              AND oxcreate < (NOW() - INTERVAL 1440 MINUTE)";

        $aData = $this->getDatabase()->getAll($sSql);

        foreach ($aData as $aUser) {
            //Delete user from OXID
            $oUser = $this->getObjectFactory()->createOxidObject('oxUser');

            if ($oUser->load($aUser['oxid'])) {
                $oUser->delete();
            }
        }
    }
public function cleanUpUnusedAccounts()
    {
        $sTable = getViewName('oxuser');
        $sSql = "SELECT oxid, oxusername
            FROM {$sTable}
            WHERE oxusername LIKE '%-%-%@amazon.com'
              AND oxcreate < (NOW() - INTERVAL 1440 MINUTE)";

        $aData = $this->getDatabase()->getAll($sSql);

        foreach ($aData as $aUser) {
            //Delete user from OXID
            $oUser = $this->getObjectFactory()->createOxidObject('oxUser');

            if ($oUser->load($aUser['oxid'])) {
                $oUser->delete();
            }
        }
    }
public function cleanUpUnusedAccounts ( ) { $ sTable = getViewName ( 'oxuser' ) ; $ sSql = "SELECT oxid, oxusername
            FROM {$sTable}
            WHERE oxusername LIKE '%-%-%@amazon.com'
              AND oxcreate < (NOW() - INTERVAL 1440 MINUTE)" ; $ aData = $ this -> getDatabase ( ) -> getAll ( $ sSql ) ; foreach ( $ aData as $ aUser ) { //Delete user from OXID $ oUser = $ this -> getObjectFactory ( ) -> createOxidObject ( 'oxUser' ) ; if ( $ oUser -> load ( $ aUser [ 'oxid' ] ) ) { $ oUser -> delete ( ) ; } } }
Deletes previously created user accounts which was not used

@throws oxConnectionException
@throws oxSystemComponentException
Deletes previously created user accounts which was not used