library/Garp/Model/Db/User.php
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);
        }
    }
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);
        }
    }
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 ) ; } }
Respond to change in email address

@param String $email The new email address
@param String $updateOrInsert Wether this was caused by an insert or an update
@return Void
Respond to change in email address