Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F952572
20191113.identity.02.populate.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
639 B
Referenced Files
None
Subscribers
None
20191113.identity.02.populate.php
View Options
<?php
$table
=
new
PhabricatorRepositoryIdentity
();
$conn
=
$table
->
establishConnection
(
'w'
);
$iterator
=
new
LiskRawMigrationIterator
(
$conn
,
$table
->
getTableName
());
foreach
(
$iterator
as
$row
)
{
$name
=
$row
[
'identityNameRaw'
];
$name
=
phutil_utf8ize
(
$name
);
$email
=
new
PhutilEmailAddress
(
$name
);
$address
=
$email
->
getAddress
();
try
{
queryfx
(
$conn
,
'UPDATE %R SET emailAddress = %ns WHERE id = %d'
,
$table
,
$address
,
$row
[
'id'
]);
}
catch
(
Exception
$ex
)
{
// We may occasionally run into issues with binary or very long addresses.
// Just skip over them.
continue
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Jun 17, 3:38 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
226537
Default Alt Text
20191113.identity.02.populate.php (639 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment