I have tried following the example listed in listener.php to grab Steam id's on users registering with their steam logins. The issue i am having is i am unsure exactly wich $social[] variable is holding the steam ID for me to pass back to have added to the custom field. Ive been trying to take guess but havent found it yet.
Any suggestions or help would be greatly appreciated as this has great potential.
Answers
$event['cp_data'] = array ( // For example: a custom field named 'tastes': 'pf_steamid' => $social['user_accounts'][0]['userid'], // Risk of E_NOTICE and NULL. );
we have submitted the extension to the official phpBB extensions repository at https://www.phpbb.com and the phpBB team asked us to remove that function as it only served as example and they don't want to see examples in the code.
This was removed from event/listener.php
/** * Event handler for custom fields and user row modifications. */ public function modify_data ($event) { global $phpbb_log, $user; // The data retrieved from the social network profile. $social = $event['social_profile']; // The following code serves as example for custom changes. /* $event['cp_data'] = array ( // For example: a custom field named 'tastes': 'pf_tastes' => $social['user_languages_simple'][0], // Risk of E_NOTICE and NULL. ); */ // Uncomment following line if you need logs. $phpbb_log->add ('admin', $user->data['user_id'], $user->ip, 'LOG_PROFILE_FIELD_EDIT', time(), $event['cp_data']); }
'oneall_sociallogin.user_add_modify_data' => 'modify_data',
but that didn't help either. Is there other supporting code that has been removed for this function to work or be called?
This extensions PHP code is a little complex for me so it may take a bit of time for me to understand how it is sequenced to work out on my own and reintroduce the feature.
you can find the latest version (before that code was removed) of the plugin here:
https://secure.oneallcdn.com/extensions/phpbb/3.1.x-3.2.x/phpbb--3.1.x--3.2.x---oneall_social_login-3.3.zip
I have reverted back to 2.8 and can confirm it works fine with the code I am putting in, something has changed significantly between 2.8 and 3.4 to brake this function. Are there version 2.9-3.2 I can test to help you nail down when it got broken, unless you can identify why?