[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 $table = new PhabricatorUser(); 4 $conn_w = $table->establishConnection('w'); 5 6 foreach (new LiskMigrationIterator($table) as $user) { 7 $username = $user->getUsername(); 8 echo "Migrating {$username}...\n"; 9 if ($user->getIsEmailVerified()) { 10 // Email already verified. 11 continue; 12 } 13 14 $primary = $user->loadPrimaryEmail(); 15 if (!$primary) { 16 // No primary email. 17 continue; 18 } 19 20 if (!$primary->getIsVerified()) { 21 // Primary email not verified. 22 continue; 23 } 24 25 // Primary email is verified, so mark the account as verified. 26 queryfx( 27 $conn_w, 28 'UPDATE %T SET isEmailVerified = 1 WHERE id = %d', 29 $table->getTableName(), 30 $user->getID()); 31 } 32 33 echo "Done.\n";
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |