library/Garp/Auth/Adapter/Abstract.php
protected function _mapProperties(array $props) {
        $authVars = $this->_getAuthVars();
        if ($authVars->mapperClass) {
            $mapper = new $authVars->mapperClass();
            if (!$mapper instanceof Garp_Auth_Adapter_Mapper_Abstract) {
                throw new Garp_Auth_Adapter_Exception('Invalid property mapper specified: ' .
                    $authVars->mapperClass);
            }
            $cols = $mapper->map($props);
        }
        if ($authVars->mapping && !empty($authVars->mapping)) {
            $cols = array();
            foreach ($authVars->mapping as $mappedProp => $col) {
                if ($col) {
                    $cols[$col] = !empty($props[$mappedProp]) ? $props[$mappedProp] : null;
                }
            }
        } else {
            throw new Garp_Auth_Exception('This authentication method requires '.
                                ' a mapping of columns in application.ini.');
        }
        
        return array_merge($cols, $this->_extendedUserColumns);
    }
protected function _mapProperties(array $props) {
        $authVars = $this->_getAuthVars();
        if ($authVars->mapperClass) {
            $mapper = new $authVars->mapperClass();
            if (!$mapper instanceof Garp_Auth_Adapter_Mapper_Abstract) {
                throw new Garp_Auth_Adapter_Exception('Invalid property mapper specified: ' .
                    $authVars->mapperClass);
            }
            $cols = $mapper->map($props);
        }
        if ($authVars->mapping && !empty($authVars->mapping)) {
            $cols = array();
            foreach ($authVars->mapping as $mappedProp => $col) {
                if ($col) {
                    $cols[$col] = !empty($props[$mappedProp]) ? $props[$mappedProp] : null;
                }
            }
        } else {
            throw new Garp_Auth_Exception('This authentication method requires '.
                                ' a mapping of columns in application.ini.');
        }
        
        return array_merge($cols, $this->_extendedUserColumns);
    }
protected function _mapProperties ( array $ props ) { $ authVars = $ this -> _getAuthVars ( ) ; if ( $ authVars -> mapperClass ) { $ mapper = new $ authVars -> mapperClass ( ) ; if ( ! $ mapper instanceof Garp_Auth_Adapter_Mapper_Abstract ) { throw new Garp_Auth_Adapter_Exception ( 'Invalid property mapper specified: ' . $ authVars -> mapperClass ) ; } $ cols = $ mapper -> map ( $ props ) ; } if ( $ authVars -> mapping && ! empty ( $ authVars -> mapping ) ) { $ cols = array ( ) ; foreach ( $ authVars -> mapping as $ mappedProp => $ col ) { if ( $ col ) { $ cols [ $ col ] = ! empty ( $ props [ $ mappedProp ] ) ? $ props [ $ mappedProp ] : null ; } } } else { throw new Garp_Auth_Exception ( 'This authentication method requires ' . ' a mapping of columns in application.ini.' ) ; } return array_merge ( $ cols , $ this -> _extendedUserColumns ) ; }
Map properties coming from the 3rd party to columns used in our database
@param Array $props
@return Array
Map properties coming from the 3rd party to columns used in our database