Sets the activated on
@param string $activated_on
@return TimestampAwareTrait
436603
public function setActivatedOn($activated_on) {
        
        $this -> activated_on = $activated_on !== null ? new \DateTime($activated_on) : null;
        return $this;
    }
183275
public function setUpdatedOn($updated_on) {
        
        $this -> updated_on = $updated_on !== null ? new \DateTime($updated_on) : null;
        return $this;
    }
875630
public function activate()
    {
        if ($this->is_email_confirmed !== true) {
            $this->is_email_confirmed = true;

            $this->raise(new Activated($this));
        }

        return $this;
    }
622776
public function setSubscriptionCount($active, $inactive)
    {
        $this->_subscriptionCount['active'] = $active;
        $this->_subscriptionCount['inactive'] = $inactive;
        return $this;
    }
399105
public function require_active_enrolment($onlyactive = true) {
        if (!empty($this->users_rs)) {
            debugging('Calling require_active_enrolment() has no effect unless you call init() again', DEBUG_DEVELOPER);
        }
        $this->onlyactive  = $onlyactive;
    }
168185
function is_activation_mode( $and_on = true ) {
            return fs_is_network_admin() ?
                $this->is_network_activation_mode( $and_on ) :
                $this->is_site_activation_mode( $and_on );
        }
1026216
public function setUpdatedAt($updated_at) {
        
        $this -> updated_at = $updated_at !== null ? new \DateTime($updated_at) : null;
        return $this;
    }
680384
public function setEnabled(Enabled $enabled)
    {
        $execute = $this->execute;
        $messages = $this->messages;
        /** @var Execute $execute */
        $execute = false === $enabled->value() ? $execute->disableTools() : $execute;
        $messages = false === $enabled->value() ? $messages->disable() : $messages;

        return new self(
            new Undefined(false),
            $enabled,
            $execute,
            $messages
        );
    }
1325777
public function setDeletedAt($deleted_at) {
        
        $this -> deleted_at = $deleted_at !== null ? new \DateTime($deleted_at) : null;
        return $this;
    }
85834
public function clear()
    {
        $expiry = $this->values['_expiry'] ?? null;
        parent::clear();
        $this->set('_changed', true);
        $this->set('_timestamp', time());
        if ($expiry)
            $this->setExpiry($expiry);
        return $this;
    }
16621
public function setCurrentTime(): self
	{
		return $this->modifyClone()->setTime((int) date('H'), (int) date('i'), (int) date('s'));
	}
75037
public function setDateRegistration($date_registration){
        if(!$this->setModified('date_registration', $date_registration)->isModified()){
            return $this;
        }
        $this->date_registration = $date_registration;

        return $this;
    }
522747
final public function isActive($active = null)
    {
        if (isset($active)) {
            $this->active = (bool) $active;
            return $this;
        }
        else {
            return $this->active;
        }
    }
69457
public static function onActivate()
    {
        $sSql = "SELECT COUNT(OXID)
            FROM oxpayments
            WHERE OXID IN ('jagamazon', 'bestitamazon')";

        //Insert payment records to DB
        $iRes = self::_getDatabase()->getOne($sSql);

        if ($iRes !== false && (int)$iRes === 0) {
            self::_executeSqlFile('install.sql');

            //Update Views
            $oDbHandler = self::_getDbMetaDataHandler();
            $oDbHandler->updateViews();
        }

        $sPaymentTable = getViewName('oxpayments');
        $sSql = "UPDATE {$sPaymentTable} SET OXACTIVE = 1 
            WHERE OXID = 'bestitamazon'";

        //Make payment active
        self::_getDatabase()->execute($sSql);

        $oConfig = self::_getConfig();
        $sUpdateFrom = $oConfig->getShopConfVar('sUpdateFrom', null, self::TMP_DB_ID);

        if ($sUpdateFrom !== null) {
            $blRemoveTempVersionNumber = version_compare($sUpdateFrom, '2.2.2', '<')
                && self::_executeSqlFile('update_2.2.2.sql');

            if (version_compare($sUpdateFrom, '2.4.0', '<')
                && self::_executeSqlFile('update_2.4.0.sql')
            ) {
                $blRemoveTempVersionNumber = true;
                self::_deactivateOldModule();
            }

            if (version_compare($sUpdateFrom, '2.6.0', '<')) {
                $blRemoveTempVersionNumber = true;
                $sNewMode = ((string)self::_getConfig()->getConfigParam('sAmazonMode') === 'Sync') ?
                    bestitAmazonPay4OxidClient::BASIC_FLOW : bestitAmazonPay4OxidClient::OPTIMIZED_FLOW;

                self::_getConfig()->setConfigParam('sAmazonMode', $sNewMode);
            }

            if ($blRemoveTempVersionNumber === true) {
                self::_removeTempVersionNumberFromDatabase();
            }
        }

        // Keep signature after module deactivation on reactivate
        $sShopId = $oConfig->getShopId();
        $sSql = "SELECT OXVARVALUE
            FROM oxconfig
            WHERE OXVARNAME = 'sAmazonSignature'
              AND OXSHOPID = '{$sShopId}'";

        $sValue = self::_getDatabase()->getOne($sSql);

        if ($sValue !== false && $sValue !== '') {
            $sQuery = "UPDATE oxconfig SET OXVARTYPE = 'str' 
                WHERE OXVARNAME = 'sAmazonSignature'
                  AND OXSHOPID = '{$sShopId}'";

            self::_getDatabase()->execute($sQuery);
        }

        // copy multi currency option value from possible hidden feature to module config
        if ((bool)$oConfig->getConfigParam('blBestitAmazonPay4OxidEnableMultiCurrency') === true) {
            $oConfig->setConfigParam('blBestitAmazonPay4OxidEnableMultiCurrency', true);
            $oConfig->saveShopConfVar(
                'bool',
                'blBestitAmazonPay4OxidEnableMultiCurrency',
                true,
                $oConfig->getShopId(),
                'module:bestitamazonpay4oxid'
            );
        }

        self::clearTmp();
    }
618154
public function UserActivatedCheck()
    {
        $user = Auth::user()->where('email', '=', Auth::user()->email )->get()->first();

        if ( $user ) {
            return $user->activated;
        } else {
            return false;
        }
    }
1353925
public function setStatus($status, $calledFromOperation = false)
    {
        parent::setStatus($status);

        // Change the Operation as well only if this method has not been called by an Operation instance to avoid recursion.
        if (!$calledFromOperation && $this->getEqualsOperation() && count($this->getOperations())) {
            $this->getOperations()[0]->setStatus($this->status, true);
        }

        return $this;
    }
951513
public function getActivateMemberCardTempinfo($activate_ticket)
    {
        $url = 'https://api.weixin.qq.com/card/membercard/activatetempinfo/get?access_token=ACCESS_TOKEN';
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, ['activate_ticket' => $activate_ticket]);
    }