Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F94033505
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
Tue, Dec 3, 09:44
Size
722 B
Mime Type
text/x-php
Expires
Thu, Dec 5, 09:44 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22717419
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