public function resendValidation($provider, $reference)
{
$socialAccount = $this->_table->find()->where(['provider' => $provider, 'reference' => $reference])->contain('Users')->first();
if (!empty($socialAccount)) {
if ($socialAccount->active) {
throw new AccountAlreadyActiveException(__d('CakeDC/Users', "Account already validated"));
}
} else {
throw new RecordNotFoundException(__d('CakeDC/Users', "Account not found for the given token and email."));
}
return $this->sendSocialValidationEmail($socialAccount, $socialAccount->user);
}