Capturing Extra Field
-
I need to capture an additional field at login time.
I’m using Buddypress and have assigned user to buddypress groups.
I need to capture which group a member belongs to as they login.I have successfully added additional code to the plugin to record and additional field into the database which works fine.
by this I mean i have added a field in the DB and included and extra field (called groups) in the update routine in the plugin. No Problems there.
Im having issue however actual getting the Buddy Press group.
Ive tried various syntax’s and variables from Budyppress and contact the buddy press forums and support to try and find a way to get this variable.
I need to capture this data so that i can do reporting based on the CSV produced by LoginLog – but i need a break down by group.
Any help would be greatly appreciated.
Here is the code where im trying to store the extra bit of data…
$group = ???????; $values = array( 'uid' => $uid, 'user_login' => $user_login, 'user_role' => $user_role, 'user_email' => $user_email, 'time' => current_time('mysql'), 'ip' => isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? esc_attr($_SERVER['HTTP_X_FORWARDED_FOR']) : esc_attr($_SERVER['REMOTE_ADDR']), 'country' => $guest_country, 'city' => $guest_city, 'login_result' => $this->login_success, 'data' => $serialized_data, 'name' => $USErname, 'group' => $group ); $format = array('%d', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s','%s','%s'); $this->save_data($values, $format);
- The topic ‘Capturing Extra Field’ is closed to new replies.