CakeDC\Users\Mailer\UsersMailer::socialAccountValidation PHP Method

socialAccountValidation() protected method

Send account validation email to the user
protected socialAccountValidation ( Cake\Datasource\EntityInterface $user, Cake\Datasource\EntityInterface $socialAccount, string $template = 'CakeDC/Users.social_account_validation' ) : array
$user Cake\Datasource\EntityInterface User entity
$socialAccount Cake\Datasource\EntityInterface SocialAccount entity
$template string string, note the first_name of the user will be prepended if exists
return array email send result
    protected function socialAccountValidation(EntityInterface $user, EntityInterface $socialAccount, $template = 'CakeDC/Users.social_account_validation')
    {
        $firstName = isset($user['first_name']) ? $user['first_name'] . ', ' : '';
        //note: we control the space after the username in the previous line
        $subject = __d('CakeDC/Users', '{0}Your social account validation link', $firstName);
        $this->to($user['email'])->subject($subject)->viewVars(compact('user', 'socialAccount'))->template($template);
    }