Open Supermillhouse opened 7 years ago
i would also like to know that too so i could get it to put the steam id from steam auth into the steam field so it can Work together with my steam status
@SchlesserClaude could you take a look, please?
Hello,
we have submitted the extension to the official phpBB extensions repository at https://www.phpbb.com and the phpBB team asked us to remove the event 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.
/*
// For Steam
$event['cp_data'] = array (
'pf_steamid' => $social['user_accounts'][0]['userid'],
);
*/
// 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']);
}
so if in my db the profile field is
user_steamid
then i should change 'pf_steamid' => $social['user_accounts'][0]['userid'],
to 'pf_steamid' => $social['user_steamid'][0]['userid'],
right?
No, you need to change pf_steamid to user_steamid
arh alright and are you also able to do that for multiple fields lets say user links it to hes steam profile then it will take hes steam id into user_steamid
and then
if he links example
also links facebook then it will takes hes first name into pf_firts_name
and last name into the pf_last_name
and also are user_accounts the DB tabel from phpbb?
You can add this code for debugging to see the full data retrieved:
print_r($event['social_profile']);
exit;
Yes, the mapping corresponds to the user_accounts table.
Now that this custom field function has been removed how do I store custom data into the database?
This was a bit of code I used to use but there is no ware to put it in the latest commit?