add akkoma to reg.php

This commit is contained in:
Arya Kiran 2022-12-09 14:56:39 +05:30
parent c251dd9c0f
commit d9e6b9229a
No known key found for this signature in database
GPG Key ID: 3A6EA2D0EE314EEF
1 changed files with 7 additions and 1 deletions

View File

@ -108,7 +108,10 @@
<label for="matrix">Matrix</label><br>
<input type="checkbox" id="fedi" name="fedi" value="Mastodon" checked>
<label for="fedi">Fediverse (Mastodon)</label><br>
<label for="fedi">Mastodon</label><br>
<input type="checkbox" id="akkoma" name="akkoma" value="Akkoma" checked>
<label for="akkoma">Akkoma (Pleroma Fork)</label><br>
<input type="checkbox" id="git" name="git" value="Gitea" checked>
<label for="git">Gitea</label><br>
@ -144,6 +147,7 @@
<?php
if (isset($_POST['matrix'])) $use_matrix = true;
if (isset($_POST['fedi'])) $use_fedi = true;
if (isset($_POST['akkoma'])) $use_akkoma = true;
if (isset($_POST['git'])) $use_git = true;
if (isset($_POST['nextcloud'])) $use_nc = true;
if (isset($_POST['peertube'])) $use_peertube = true;
@ -155,6 +159,7 @@
$message = "Hello Administrators,\nSomeone has requested a membership. Please view the details below and decide if it is worth approving.\n\nSSH keys:\n$ssh\n\nRequested username: $username\nRequested services: Tilde";
if ($use_matrix) $message .= ", Matrix";
if ($use_fedi) $message .= ", Mastodon";
if ($use_akkoma) $message .= ", Akkoma";
if ($use_git) $message .= ", Gitea";
if ($use_nc) $message .= ", Nextcloud";
if ($use_peertube) $message .= ", PeerTube";
@ -176,6 +181,7 @@
$contents .= '~/bin/mkfuser ' . escapeshellarg($username) . ' ' . escapeshellarg($email) . ' | tee /sshfs' . escapeshellarg($pass_file) . "\n";
unset($pass_file);
}
if ($use_akkoma) $contents .= '~/bin/mkauser ' . escapeshellarg($username) . ' "$password"' . "\n";
if ($use_git) $contents .= '~/bin/mkguser ' . escapeshellarg($username) . ' "$password"' . ' ' . escapeshellarg($email) . "\n";
if ($use_nc) $contents .= '~/bin/mknuser ' . escapeshellarg($username) . ' "$password"' . "\n";
if ($use_peertube) $contents .= '~/bin/mkpuser ' . escapeshellarg($username) . ' "$password"' . ' ' . escapeshellarg($email) . "\n";