Changeset 359 for trunk/bp-xprofile/bp-xprofile-classes.php
- Timestamp:
- 09/24/2008 05:31:27 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/bp-xprofile/bp-xprofile-classes.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-classes.php
r343 r359 1084 1084 $user_id = $bp['current_userid']; 1085 1085 1086 if ( !$bp['profile'] ) 1087 xprofile_setup_globals(); 1088 1086 1089 $field_sql = ''; 1087 1090 … … 1100 1103 1101 1104 $sql = $wpdb->prepare( "SELECT d.value, f.name FROM " . $bp['profile']['table_name_data'] . " d, " . $bp['profile']['table_name_fields'] . " f WHERE d.field_id = f.id AND d.user_id = %d AND f.parent_id = 0 $field_sql", $user_id ); 1102 1105 1103 1106 if ( !$values = $wpdb->get_results($sql) ) 1104 1107 return false; … … 1145 1148 global $wpdb, $bp; 1146 1149 1147 return $wpdb->query( $wpdb->prepare( "DELETE FROM " . $bp['profile']['table_name_data'] . " WHERE user_id = %d", $user_id ) ); 1148 1150 return $wpdb->query( $wpdb->prepare( "DELETE FROM " . $bp['profile']['table_name_data'] . " WHERE user_id = %d", $user_id ) ); 1151 } 1152 1153 function get_fullname( $user_id = false ) { 1154 global $bp; 1155 1156 if ( !$user_id ) 1157 $user_id = $bp['current_userid']; 1158 1159 $data = bp_get_field_data( array( 'First Name', 'Last Name' ), $user_id ); 1160 1161 return ucfirst($data['First Name']) . ' ' . ucfirst($data['Last Name']); 1149 1162 } 1150 1163 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)