public function mailActivationLink(AnCommandContext $context)
    {
        $person = $context->result;
        $viewer = get_viewer();

        if ($viewer->admin()) {
            $subject = 'COM-PEOPLE-MAIL-SUBJECT-ACCOUNT-CREATED';
            $template = 'account_created';
        } else {
            $subject = 'COM-PEOPLE-MAIL-SUBJECT-ACCOUNT-ACTIVATE';
            $template = 'account_activate';
        }

        $settings = $this->getService('com:settings.setting');

        $mails[] = array(
            'to' => $person->email,
            'subject' => sprintf(AnTranslator::_($subject), $settings->sitename),
            'template' => $template,
        );

        $this->mail($mails);
    }
public function mailActivationLink(AnCommandContext $context)
    {
        $person = $context->result;
        $viewer = get_viewer();

        if ($viewer->admin()) {
            $subject = 'COM-PEOPLE-MAIL-SUBJECT-ACCOUNT-CREATED';
            $template = 'account_created';
        } else {
            $subject = 'COM-PEOPLE-MAIL-SUBJECT-ACCOUNT-ACTIVATE';
            $template = 'account_activate';
        }

        $settings = $this->getService('com:settings.setting');

        $mails[] = array(
            'to' => $person->email,
            'subject' => sprintf(AnTranslator::_($subject), $settings->sitename),
            'template' => $template,
        );

        $this->mail($mails);
    }
public function mailActivationLink ( AnCommandContext $ context ) { $ person = $ context -> result ; $ viewer = get_viewer ( ) ; if ( $ viewer -> admin ( ) ) { $ subject = 'COM-PEOPLE-MAIL-SUBJECT-ACCOUNT-CREATED' ; $ template = 'account_created' ; } else { $ subject = 'COM-PEOPLE-MAIL-SUBJECT-ACCOUNT-ACTIVATE' ; $ template = 'account_activate' ; } $ settings = $ this -> getService ( 'com:settings.setting' ) ; $ mails [ ] = array ( 'to' => $ person -> email , 'subject' => sprintf ( AnTranslator :: _ ( $ subject ) , $ settings -> sitename ) , 'template' => $ template , ) ; $ this -> mail ( $ mails ) ; }
Mail an activation link.

@param AnCommandContext $context The context parameter
Mail an activation link .