Opened 12 years ago
Closed 12 years ago
#4912 closed defect (bug) (fixed)
xprofile BP_XProfile_Field populate do not fill data
Reported by: | eggproject | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 1.8 | Priority: | low |
Severity: | minor | Version: | 1.2.8 |
Component: | Extended Profile | Keywords: | |
Cc: | eggprojec@… |
Description
$tmp = new BP_XProfile_Field(FIELDID,USERID);
do not fill auto with data...
function populate .... remove $user_id = 0;!
Change History (8)
#2
@
12 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
+1 to Boone's assessment. Closing as invalid for now. Reopen if/when you can attach more details.
#3
@
12 years ago
- Keywords reporter-feedback removed
- Milestone set to Future Release
- Resolution invalid deleted
- Status changed from closed to reopened
- Version changed from 1.6.4 to 1.2.8
BP_XProfile_Field does not have a populate() method.
It does. See:
https://buddypress.trac.wordpress.org/browser/tags/1.7-rc1/bp-xprofile/bp-xprofile-classes.php#L453
There's also an inline note denoting why we are even wiping out the $user_id
variable:
https://buddypress.trac.wordpress.org/browser/tags/1.7-rc1/bp-xprofile/bp-xprofile-classes.php#L456
The good news is we never use the second or third parameters of BP_XProfile_Field::populate()
internally. So it looks like eggproject is doing something specific.
We should perhaps look at rectifying this.
#4
@
12 years ago
about i use...
$cfield = new BP_XProfile_Field($kitKeresekFieldId,$cuserId);
$cvalue = maybe_unserialize($dfield->data->value);
original code to the constructor is not charged in $ data ....
function construct( $id = null, $user_id = null, $get_data = true ) {
if ( !empty( $id ) )
$this->populate( $id, $user_id, $get_data );
}
call populate... my code fill this object ...
#6
@
12 years ago
- Milestone changed from Future Release to 1.8
- Priority changed from normal to low
- Severity changed from normal to minor
My bad, I was misreading the code. Let's check the logs to see why we're wiping out $user_id here. Since, as r-a-y notes, we're not using the $user_id param anywhere in BP, this should be pretty harmless to fix (though we may want to check the plugin repo to see if anyone is taking advantage of this mysterious bug in a plugin).
Can you please be more specific about what your problem is? I do not understand what you're trying to say here. (
BP_XProfile_Field
does not have apopulate()
method.)