Version 5.0.0 beta 9
This commit is contained in:
1 parent
214f649f1d
commit
56979f8ee8
202 files changed
+4403
-1123
No files matched your search
@@ -81,7 +81,27 @@ class Upgrade
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public function step3() : bool|array
|
||||
{
|
||||
/* Fix any pending email changes */
|
||||
$pending = iterator_to_array(
|
||||
Db::i()->select( 'core_validating.*,core_members.email', 'core_validating', [ 'email_chg=?', 1 ] )
|
||||
->join( 'core_members', 'core_validating.member_id=core_members.member_id' )
|
||||
);
|
||||
|
||||
foreach( $pending as $row )
|
||||
{
|
||||
/* Update the database directly, we don't want to trigger any memberSync events */
|
||||
$newEmail = $row['email'];
|
||||
$oldEmail = $row['new_email']; // this was renamed from core_validating.prev_email
|
||||
Db::i()->update( 'core_members', [ 'email' => $oldEmail ], [ 'member_id=?', $row['member_id'] ] );
|
||||
Db::i()->update( 'core_validating', [ 'new_email' => $newEmail ], [ 'vid=?', $row['vid'] ] );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// You can create as many additional methods (step2, step3, etc.) as is necessary.
|
||||
// Each step will be executed in a new HTTP request
|
||||
}
|
||||
Reference in new issue
Block a user