protected function _onEmailChange($email, $updateOrInsert = 'insert') {
        $authVars = Garp_Auth::getInstance()->getConfigValues('validateemail');

        // See if validation of email is enabled
        if (empty($authVars['enabled']) || !$authVars['enabled']) {
            return;
        }
        $validationTokenColumn = $authVars['token_column'];
        $emailValidColumn = $authVars['email_valid_column'];

        // Fetch fresh user data by email
        $users = $this->fetchAll(
            $this->select()->from(
                $this->getName(),
                array('id', 'email', $validationTokenColumn, $emailValidColumn)
            )
                ->where('email = ?', $email)
        );

        // Generate validation token for all the found users
        foreach ($users as $user) {
            $this->invalidateEmailAddress($user, $updateOrInsert);
        }
    }