Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F449072
20131112.userverified.2.mig.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
722 B
Referenced Files
None
Subscribers
None
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
"
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 4, 7:02 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
67255
Default Alt Text
20131112.userverified.2.mig.php (722 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment