Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2892576
20131112.userverified.2.mig.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
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, Jan 19, 17:01 (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126747
Default Alt Text
20131112.userverified.2.mig.php (722 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment