mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 09:12:41 +01:00
41d2a09536
Summary: Adds "verified" and "secretKey" to Legalpad document signatures. For logged in users using an email address they own, things are verified right away. Otherwise, the email is sent a verification letter. When the user clicks the link the signature is marked verified. Test Plan: signed the document with a bogus email address not logged in. verified the email that would be sent looked good from command line. followed link and successfully verified bogus email address Reviewers: epriestley Reviewed By: epriestley CC: Korvin, epriestley, aran, asherkin Maniphest Tasks: T4283 Differential Revision: https://secure.phabricator.com/D7930
23 lines
519 B
PHP
23 lines
519 B
PHP
<?php
|
|
|
|
echo "Adding secretkeys to legalpad document signatures.\n";
|
|
|
|
$table = new LegalpadDocumentSignature();
|
|
$conn_w = $table->establishConnection('w');
|
|
$iterator = new LiskMigrationIterator($table);
|
|
foreach ($iterator as $sig) {
|
|
$id = $sig->getID();
|
|
|
|
echo "Populating signature {$id}...\n";
|
|
|
|
if (!$sig->getSecretKey()) {
|
|
queryfx(
|
|
$conn_w,
|
|
'UPDATE %T SET secretKey = %s WHERE id = %d',
|
|
$table->getTableName(),
|
|
Filesystem::readRandomCharacters(20),
|
|
$id);
|
|
}
|
|
}
|
|
|
|
echo "Done.\n";
|