Add XMPP registration

Signed-off-by: Aleksandar 'The Cobra' Widulski <thecobra@riseup.net>
This commit is contained in:
Aleksandar 'The Cobra' Widulski 2022-06-03 09:24:13 -04:00
parent ca74c55bec
commit 775bffa6f6
Signed by: cobra
GPG Key ID: 4FD8F812083FF6F9
1 changed files with 7 additions and 1 deletions

View File

@ -135,6 +135,9 @@
<input type="checkbox" id="jitsi" name="jitsi" value="Jitsi" checked>
<label for="jitsi">Jitsi</label><br>
<input type="checkbox" id="xmpp" name="xmpp" value="XMPP" checked>
<label for="xmpp">XMPP/Jabber</label><br>
<!-- <input type="checkbox" id="nextcloud" name="nextcloud" value="Nextcloud">
<label for="nextcloud">Nextcloud</label><br> -->
@ -155,6 +158,7 @@
if (isset($_POST['fedi'])) $use_fedi = true;
if (isset($_POST['git'])) $use_git = true;
if (isset($_POST['jitsi'])) $use_jitsi = true;
if (isset($_POST['xmpp'])) $use_xmpp = true;
if (isset($_POST['nextcloud'])) $use_nextcloud = true;
$to = "root@vern.cc";
$subject = "New registration request from " . $username . "<" . $email . ">";
@ -163,6 +167,7 @@
if ($use_fedi) $message .= ", Mastodon";
if ($use_git) $message .= ", Gitea";
if ($use_jitsi) $message .= ", Jitsi";
if ($use_xmpp) $message .= ", XMPP";
if ($use_nextcloud) $message .= ", Nextcloud";
$message .= ".\nJoin reason:\n" . $reason . "\n\n\nTo accept this request, run this command as root:\n/root/bin/accept " . $username . "\nTo deny this request, run this command as root:\n/root/bin/deny " . $username . "\n";
@ -171,7 +176,8 @@
if ($use_matrix) $contents .= "\n~/bin/mkmuser \"" . $username . "\" \"" . $password0 . "\"\n";
if ($use_fedi) $contents .= "~/bin/mkfuser \"" . $username . "\" \"" . $email . "\"\n";
if ($use_git) $contents .= "~/bin/mkguser \"" . $username . "\" \"" . $password0 . "\" \"" . $email . "\"\n";
if ($use_jitsi) $contents .= "~/bin/mkjuser \"" . $username . "\" \"" . $password0 . "\"\n";
if ($use_jitsi) $contents .= "~/bin/mkxuser \"" . $username . "\" \"" . $password0 . "\" jitsi.vern.cc\n";
if ($use_xmpp) $contents .= "~/bin/mkxuser \"" . $username . "\" \"" . $password0 . "\" vern.cc\n";
// if ($use_nextcloud) $contents .= "~/bin/mknuser \"" . $username . "\"\n";
$contents .= "rm -f $0\n";