src/Auth/HybridAuthAuthenticate.php
protected function _profileEntity($profile = null)
    {
        if (!$profile) {
            $profile = $this->_profileModel->newEntity([
                'provider' => $this->adapter()->id,
            ]);
        }

        foreach (get_object_vars($this->profile()) as $key => $value) {
            switch ($key) {
                case 'webSiteURL':
                    $profile->set('website_url', $value);
                    break;

                case 'profileURL':
                    $profile->set('profile_url', $value);
                    break;

                case 'photoURL':
                    $profile->set('photo_url', $value);
                    break;

                default:
                    $profile->set(Inflector::underscore($key), $value);
                    break;
            }
        }

        return $profile;
    }
protected function _profileEntity($profile = null)
    {
        if (!$profile) {
            $profile = $this->_profileModel->newEntity([
                'provider' => $this->adapter()->id,
            ]);
        }

        foreach (get_object_vars($this->profile()) as $key => $value) {
            switch ($key) {
                case 'webSiteURL':
                    $profile->set('website_url', $value);
                    break;

                case 'profileURL':
                    $profile->set('profile_url', $value);
                    break;

                case 'photoURL':
                    $profile->set('photo_url', $value);
                    break;

                default:
                    $profile->set(Inflector::underscore($key), $value);
                    break;
            }
        }

        return $profile;
    }
protected function _profileEntity ( $ profile = null ) { if ( ! $ profile ) { $ profile = $ this -> _profileModel -> newEntity ( [ 'provider' => $ this -> adapter ( ) -> id , ] ) ; } foreach ( get_object_vars ( $ this -> profile ( ) ) as $ key => $ value ) { switch ( $ key ) { case 'webSiteURL' : $ profile -> set ( 'website_url' , $ value ) ; break ; case 'profileURL' : $ profile -> set ( 'profile_url' , $ value ) ; break ; case 'photoURL' : $ profile -> set ( 'photo_url' , $ value ) ; break ; default : $ profile -> set ( Inflector :: underscore ( $ key ) , $ value ) ; break ; } } return $ profile ; }
Get social profile entity

@param \Cake\ORM\Entity $profile Social profile entity
@return \Cake\ORM\Entity
Get social profile entity