Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F113087382
20131112.userverified.2.mig.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, May 14, 21:04
Size
722 B
Mime Type
text/x-php
Expires
Fri, May 16, 21:04 (2 d)
Engine
blob
Format
Raw Data
Handle
26176690
Attached To
rPH Phabricator
20131112.userverified.2.mig.php
View Options
<?php
$table
=
new
PhabricatorUser
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$user
)
{
$username
=
$user
->
getUsername
();
echo
pht
(
'Migrating %s...'
,
$username
).
"
\n
"
;
if
(
$user
->
getIsEmailVerified
())
{
// Email already verified.
continue
;
}
$primary
=
$user
->
loadPrimaryEmail
();
if
(!
$primary
)
{
// No primary email.
continue
;
}
if
(!
$primary
->
getIsVerified
())
{
// Primary email not verified.
continue
;
}
// Primary email is verified, so mark the account as verified.
queryfx
(
$conn_w
,
'UPDATE %T SET isEmailVerified = 1 WHERE id = %d'
,
$table
->
getTableName
(),
$user
->
getID
());
}
echo
pht
(
'Done.'
).
"
\n
"
;
Event Timeline
Log In to Comment