library/Garp/Model/Db/User.php
public function sendEmailValidationEmail(
        Garp_Db_Table_Row $user, $code, $updateOrInsert = 'insert'
    ) {
        $authVars = Garp_Auth::getInstance()->getConfigValues('validateemail');

        // Render the email message
        $activationUrl = '/g/auth/validateemail/c/' . $code . '/e/' . md5($user->email) . '/';

        if (!empty($authVars['email_partial'])) {
            $view = Zend_Registry::get('application')->getBootstrap()
                ->getResource('view');

            $emailMessage = $view->partial(
                $authVars['email_partial'], 'default', array(
                'user' => $user,
                'activationUrl' => $activationUrl,
                'updateOrInsert' => $updateOrInsert
                )
            );
            $messageParam = 'htmlMessage';
        } else {
            $snippetId = 'validate email ';
            $snippetId .= $updateOrInsert == 'insert' ? 'new user' : 'existing user';
            $snippetId .= ' email';
            $emailMessage = __($snippetId);
            $emailMessage = Garp_Util_String::interpolate(
                $emailMessage, array(
                'USERNAME' => (string)new Garp_Util_FullName($user),
                'ACTIVATION_URL' => (string)new Garp_Util_FullUrl($activationUrl)
                )
            );
            $messageParam = 'message';
        }

        $mailer = new Garp_Mailer();
        return $mailer->send(
            array(
            'to' => $user->email,
            'subject' => __($authVars['email_subject']),
            $messageParam => $emailMessage
            )
        );
    }
public function sendEmailValidationEmail(
        Garp_Db_Table_Row $user, $code, $updateOrInsert = 'insert'
    ) {
        $authVars = Garp_Auth::getInstance()->getConfigValues('validateemail');

        // Render the email message
        $activationUrl = '/g/auth/validateemail/c/' . $code . '/e/' . md5($user->email) . '/';

        if (!empty($authVars['email_partial'])) {
            $view = Zend_Registry::get('application')->getBootstrap()
                ->getResource('view');

            $emailMessage = $view->partial(
                $authVars['email_partial'], 'default', array(
                'user' => $user,
                'activationUrl' => $activationUrl,
                'updateOrInsert' => $updateOrInsert
                )
            );
            $messageParam = 'htmlMessage';
        } else {
            $snippetId = 'validate email ';
            $snippetId .= $updateOrInsert == 'insert' ? 'new user' : 'existing user';
            $snippetId .= ' email';
            $emailMessage = __($snippetId);
            $emailMessage = Garp_Util_String::interpolate(
                $emailMessage, array(
                'USERNAME' => (string)new Garp_Util_FullName($user),
                'ACTIVATION_URL' => (string)new Garp_Util_FullUrl($activationUrl)
                )
            );
            $messageParam = 'message';
        }

        $mailer = new Garp_Mailer();
        return $mailer->send(
            array(
            'to' => $user->email,
            'subject' => __($authVars['email_subject']),
            $messageParam => $emailMessage
            )
        );
    }
public function sendEmailValidationEmail ( Garp_Db_Table_Row $ user , $ code , $ updateOrInsert = 'insert' ) { $ authVars = Garp_Auth :: getInstance ( ) -> getConfigValues ( 'validateemail' ) ; // Render the email message $ activationUrl = '/g/auth/validateemail/c/' . $ code . '/e/' . md5 ( $ user -> email ) . '/' ; if ( ! empty ( $ authVars [ 'email_partial' ] ) ) { $ view = Zend_Registry :: get ( 'application' ) -> getBootstrap ( ) -> getResource ( 'view' ) ; $ emailMessage = $ view -> partial ( $ authVars [ 'email_partial' ] , 'default' , array ( 'user' => $ user , 'activationUrl' => $ activationUrl , 'updateOrInsert' => $ updateOrInsert ) ) ; $ messageParam = 'htmlMessage' ; } else { $ snippetId = 'validate email ' ; $ snippetId .= $ updateOrInsert == 'insert' ? 'new user' : 'existing user' ; $ snippetId .= ' email' ; $ emailMessage = __ ( $ snippetId ) ; $ emailMessage = Garp_Util_String :: interpolate ( $ emailMessage , array ( 'USERNAME' => ( string ) new Garp_Util_FullName ( $ user ) , 'ACTIVATION_URL' => ( string ) new Garp_Util_FullUrl ( $ activationUrl ) ) ) ; $ messageParam = 'message' ; } $ mailer = new Garp_Mailer ( ) ; return $ mailer -> send ( array ( 'to' => $ user -> email , 'subject' => __ ( $ authVars [ 'email_subject' ] ) , $ messageParam => $ emailMessage ) ) ; }
Send validation email to the user

@param Garp_Db_Table_Row $user The user
@param String $code The validation code
@param String $updateOrInsert Wether this was caused by an insert or an update
@return Boolean
Send validation email to the user