library/Garp/Model/Db/User.php
public function invalidateEmailAddress(Garp_Db_Table_Row $user, $updateOrInsert = 'insert') {
        $authVars = Garp_Auth::getInstance()->getConfigValues('validateemail');
        $validationTokenColumn = $authVars['token_column'];
        $emailValidColumn = $authVars['email_valid_column'];

        if ($updateOrInsert == 'insert' && array_get($user, $emailValidColumn)) {
            return true;
        } 
        
        // Generate the validation code
        $validationToken = uniqid();
        $validationCode = $this->generateEmailValidationCode($user, $validationToken);

        if (!$user->isConnected()) {
            $user->setTable($this);
        }

        // Store the token in the user record
        $user->{$validationTokenColumn} = $validationToken;
        // Invalidate the user's email
        $user->{$emailValidColumn} = 0;

        if ($user->save()) {
            return $this->sendEmailValidationEmail($user, $validationCode, $updateOrInsert);
        }
        return false;
    }
public function invalidateEmailAddress(Garp_Db_Table_Row $user, $updateOrInsert = 'insert') {
        $authVars = Garp_Auth::getInstance()->getConfigValues('validateemail');
        $validationTokenColumn = $authVars['token_column'];
        $emailValidColumn = $authVars['email_valid_column'];

        if ($updateOrInsert == 'insert' && array_get($user, $emailValidColumn)) {
            return true;
        } 
        
        // Generate the validation code
        $validationToken = uniqid();
        $validationCode = $this->generateEmailValidationCode($user, $validationToken);

        if (!$user->isConnected()) {
            $user->setTable($this);
        }

        // Store the token in the user record
        $user->{$validationTokenColumn} = $validationToken;
        // Invalidate the user's email
        $user->{$emailValidColumn} = 0;

        if ($user->save()) {
            return $this->sendEmailValidationEmail($user, $validationCode, $updateOrInsert);
        }
        return false;
    }
public function invalidateEmailAddress ( Garp_Db_Table_Row $ user , $ updateOrInsert = 'insert' ) { $ authVars = Garp_Auth :: getInstance ( ) -> getConfigValues ( 'validateemail' ) ; $ validationTokenColumn = $ authVars [ 'token_column' ] ; $ emailValidColumn = $ authVars [ 'email_valid_column' ] ; if ( $ updateOrInsert == 'insert' && array_get ( $ user , $ emailValidColumn ) ) { return true ; } // Generate the validation code $ validationToken = uniqid ( ) ; $ validationCode = $ this -> generateEmailValidationCode ( $ user , $ validationToken ) ; if ( ! $ user -> isConnected ( ) ) { $ user -> setTable ( $ this ) ; } // Store the token in the user record $ user -> { $ validationTokenColumn } = $ validationToken ; // Invalidate the user's email $ user -> { $ emailValidColumn } = 0 ; if ( $ user -> save ( ) ) { return $ this -> sendEmailValidationEmail ( $ user , $ validationCode , $ updateOrInsert ) ; } return false ; }
Start the email validation procedure

@param Garp_Db_Table_Row $user
@param String $updateOrInsert Wether this was caused by an insert or an update
@return Boolean Wether the procedure succeeded
Start the email validation procedure