You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-07-29 22:41:11 +03:00
reindent / reformat; add type hints for some of the app password stuff; try and make sure someone can only remove their own app password (see revokeAppPassword() )
This commit is contained in:
@ -20,14 +20,14 @@ $stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
|
||||
if ($result->num_rows == 1) {
|
||||
echo "Updating TOTP secret for $USERNAME\n";
|
||||
$row = $result->fetch_assoc();
|
||||
$preferences = unserialize($row['preferences']);
|
||||
$preferences['twofactor_gauthenticator']['secret'] = $SHARED_SECRET;
|
||||
$stmt_update = $mysqli->prepare("UPDATE users SET preferences=?");
|
||||
$stmt_update->bind_param("s", serialize($preferences));
|
||||
$stmt_update->execute();
|
||||
echo "Updating TOTP secret for $USERNAME\n";
|
||||
$row = $result->fetch_assoc();
|
||||
$preferences = unserialize($row['preferences']);
|
||||
$preferences['twofactor_gauthenticator']['secret'] = $SHARED_SECRET;
|
||||
$stmt_update = $mysqli->prepare("UPDATE users SET preferences=?");
|
||||
$stmt_update->bind_param("s", serialize($preferences));
|
||||
$stmt_update->execute();
|
||||
} else {
|
||||
echo "Could not find user $USERNAME in Roundcubemail.\n";
|
||||
echo "Could not find user $USERNAME in Roundcubemail.\n";
|
||||
}
|
||||
$mysqli->close();
|
||||
|
Reference in New Issue
Block a user