Пример #1
0
function registration_mail_send(&$api, &$user)
{
    $subject = _('Your registration at [SITE_TITLE]');
    $body = _("Hello [FIRSTNAME] [LASTNAME],\n" . "\n" . "Thank you for registering at" . " [SITE_TITLE]. Your account name" . " is \"[LOGIN]\".\n" . "\n" . "Please confirm your email address by" . " clicking the registration link below." . "\n" . "[URL]\n");
    $username = urlencode($user->get_name());
    $hash = urlencode($user->get_confirmation_hash());
    $url = cfg('site_url') . '?action=account_confirm' . "&username={$username}&hash={$hash}";
    $api->send_mail($user, $subject, $body, array('url' => $url));
    include_once dirname(__FILE__) . '/registration_controller.class.php';
    $controller = new RegistrationController($api);
    $controller->show_mail_sent($user);
}