Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F110213273
20140410.accountsecret.2.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
Fri, Apr 25, 05:16
Size
449 B
Mime Type
text/x-php
Expires
Sun, Apr 27, 05:16 (2 d)
Engine
blob
Format
Raw Data
Handle
25795352
Attached To
rPH Phabricator
20140410.accountsecret.2.php
View Options
<?php
echo
pht
(
'Updating users...'
).
"
\n
"
;
foreach
(
new
LiskMigrationIterator
(
new
PhabricatorUser
())
as
$user
)
{
$id
=
$user
->
getID
();
echo
pht
(
'Updating %d...'
,
$id
).
"
\n
"
;
if
(
strlen
(
$user
->
getAccountSecret
()))
{
continue
;
}
queryfx
(
$user
->
establishConnection
(
'w'
),
'UPDATE %T SET accountSecret = %s WHERE id = %d'
,
$user
->
getTableName
(),
Filesystem
::
readRandomCharacters
(
64
),
$id
);
}
echo
pht
(
'Done.'
).
"
\n
"
;
Event Timeline
Log In to Comment