Changeset 8165
- Timestamp:
- 03/26/2014 09:44:30 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-classes.php
r8022 r8165 1127 1127 if ( false === $profiledata ) { 1128 1128 $sql = $wpdb->prepare( "SELECT * FROM {$bp->profile->table_name_data} WHERE field_id = %d AND user_id = %d", $field_id, $user_id ); 1129 1130 if ( $profiledata = $wpdb->get_row( $sql ) ) { 1131 $this->id = $profiledata->id; 1132 $this->user_id = $profiledata->user_id; 1133 $this->field_id = $profiledata->field_id; 1134 $this->value = stripslashes( $profiledata->value ); 1135 $this->last_updated = $profiledata->last_updated; 1136 1129 $profiledata = $wpdb->get_row( $sql ); 1130 1131 if ( $profiledata ) { 1137 1132 wp_cache_set( $field_id, $profiledata, $cache_group ); 1138 } else { 1139 // When no row is found, we'll need to set these properties manually 1140 $this->field_id = $field_id; 1141 $this->user_id = $user_id; 1142 } 1133 } 1134 } 1135 1136 if ( $profiledata ) { 1137 $this->id = $profiledata->id; 1138 $this->user_id = $profiledata->user_id; 1139 $this->field_id = $profiledata->field_id; 1140 $this->value = stripslashes( $profiledata->value ); 1141 $this->last_updated = $profiledata->last_updated; 1142 1143 } else { 1144 // When no row is found, we'll need to set these properties manually 1145 $this->field_id = $field_id; 1146 $this->user_id = $user_id; 1143 1147 } 1144 1148 }
Note: See TracChangeset
for help on using the changeset viewer.