protected function resendActivationMail(MemberModel $objMember)
	{
		if ($objMember->disable == '')
		{
			return;
		}

		$this->strTemplate = 'mod_message';
		$this->Template = new FrontendTemplate($this->strTemplate);

		/** @var OptIn $optIn */
		$optIn = System::getContainer()->get('contao.opt-in');
		$optInToken = null;
		$models = OptInModel::findByRelatedTableAndIds('tl_member', array($objMember->id));

		foreach ($models as $model)
		{
			// Look for a valid, unconfirmed token
			if (($token = $optIn->find($model->token)) && $token->isValid() && !$token->isConfirmed())
			{
				$optInToken = $token;
				break;
			}
		}

		if ($optInToken === null)
		{
			return;
		}

		$optInToken->send();

		// Confirm activation
		$this->Template->type = 'confirm';
		$this->Template->message = $GLOBALS['TL_LANG']['MSC']['resendActivation'];
	}
protected function resendActivationMail(MemberModel $objMember)
	{
		if ($objMember->disable == '')
		{
			return;
		}

		$this->strTemplate = 'mod_message';
		$this->Template = new FrontendTemplate($this->strTemplate);

		
		$optIn = System::getContainer()->get('contao.opt-in');
		$optInToken = null;
		$models = OptInModel::findByRelatedTableAndIds('tl_member', array($objMember->id));

		foreach ($models as $model)
		{
			
			if (($token = $optIn->find($model->token)) && $token->isValid() && !$token->isConfirmed())
			{
				$optInToken = $token;
				break;
			}
		}

		if ($optInToken === null)
		{
			return;
		}

		$optInToken->send();

		
		$this->Template->type = 'confirm';
		$this->Template->message = $GLOBALS['TL_LANG']['MSC']['resendActivation'];
	}
protected function resendActivationMail ( MemberModel $ objMember ) { if ( $ objMember -> disable == '' ) { return ; } $ this -> strTemplate = 'mod_message' ; $ this -> Template = new FrontendTemplate ( $ this -> strTemplate ) ; /** @var OptIn $optIn */ $ optIn = System :: getContainer ( ) -> get ( 'contao.opt-in' ) ; $ optInToken = null ; $ models = OptInModel :: findByRelatedTableAndIds ( 'tl_member' , array ( $ objMember -> id ) ) ; foreach ( $ models as $ model ) { // Look for a valid, unconfirmed token if ( ( $ token = $ optIn -> find ( $ model -> token ) ) && $ token -> isValid ( ) && ! $ token -> isConfirmed ( ) ) { $ optInToken = $ token ; break ; } } if ( $ optInToken === null ) { return ; } $ optInToken -> send ( ) ; // Confirm activation $ this -> Template -> type = 'confirm' ; $ this -> Template -> message = $ GLOBALS [ 'TL_LANG' ] [ 'MSC' ] [ 'resendActivation' ] ; }
Re-send the activation mail

@param MemberModel $objMember
Re - send the activation mail