PHP code example of kalypso63 / social_auth

1. Go to this page and download the library: Download kalypso63/social_auth library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kalypso63 / social_auth example snippets



namespace Vendor\ExtensionKey\Slots;
class UserAuthentificationSlot {
    /**
     * @param $hybridUser string
     * @param $fields array
     * @param \MV\SocialAuth\Service\SocialAuthenticationService $pObj
     */
    public function beforeCreateOrUpdateUser($hybridUser, &$fields = array(), \MV\SocialAuth\Service\SocialAuthenticationService $pObj) {
        $fields['tx_extbase_type'] = 'Tx_YourExtension_User';
        if($hybridUser->birthDay && $hybridUser->birthMonth && $hybridUser->birthYear){
            $fields['birthdate'] = mktime(NULL, NULL, NULL, (int) $hybridUser->birthMonth, (int) $hybridUser->birthDay, (int) $hybridUser->birthYear);
        }
    }
}