[buddypress-trac] [BuddyPress Trac] #5553: BP 2.0 upgrade routine improperly deletes existing user roles if activation_key usermeta is present

buddypress-trac noreply at wordpress.org
Tue Apr 22 16:46:02 UTC 2014


#5553: BP 2.0 upgrade routine improperly deletes existing user roles if
activation_key usermeta is present
-----------------------------------+--------------------
 Reporter:  boonebgorges           |       Owner:
     Type:  defect (bug)           |      Status:  new
 Priority:  highest                |   Milestone:  2.0.1
Component:  Core                   |     Version:  2.0
 Severity:  critical               |  Resolution:
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+--------------------

Comment (by imath):

 Replying to [comment:18 boonebgorges]:
 > My method is safer, but it does introduce more overhead during the
 upgrade process. Have a test and see what you think.
 Yes i agree, let's take as less as possible risks.

 I've tested it and had a problem. I think it's due to the fact the $signup
 var is first use in the loop to attach activation_keys to signups, then
 use in the loop to migrate the signups
 As a result, i had the same user migrated several times

 unsetting $signup seems to fix this.

 In 5553.08.diff i've also edited the tests, though i'm not sure i did
 well. The migrate process will only happen on non multisite, and keys are
 defined "old-way" with {{{wp_hash( $user_id )}}}. So edited the functions
 using this way of setting the activation_keys.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5553#comment:19>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list