aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Regate.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-28 20:40:26 +0000
committerMario <mario@mariovavti.com>2021-03-28 20:40:26 +0000
commit18d990a03468420136c3383fce9860c09f42251c (patch)
treefd43925fcf3b5c0a0ea026450c9b5ea32a2c9938 /Zotlabs/Module/Regate.php
parent85b6e352d41580918c84298790916786f384f8b5 (diff)
downloadvolse-hubzilla-18d990a03468420136c3383fce9860c09f42251c.tar.gz
volse-hubzilla-18d990a03468420136c3383fce9860c09f42251c.tar.bz2
volse-hubzilla-18d990a03468420136c3383fce9860c09f42251c.zip
air: more ui/ux and provide a possibility to lookup your registration id in mod regate (raw and unfinished)
Diffstat (limited to 'Zotlabs/Module/Regate.php')
-rw-r--r--Zotlabs/Module/Regate.php23
1 files changed, 22 insertions, 1 deletions
diff --git a/Zotlabs/Module/Regate.php b/Zotlabs/Module/Regate.php
index f6faff811..d51927de1 100644
--- a/Zotlabs/Module/Regate.php
+++ b/Zotlabs/Module/Regate.php
@@ -215,6 +215,27 @@ class Regate extends \Zotlabs\Web\Controller {
function get() {
+ if (argc() == 1) {
+ if(isset($_GET['reg_id'])) {
+ if ( preg_match('/^.{2,64}\@[a-z0-9.-]{4,32}\.[a-z]{2,12}$/', $_GET['reg_id'] ) ) {
+ // dId2 E email
+ goaway(z_root() . '/regate/' . bin2hex($_GET['reg_id']) . 'e' );
+ }
+ if ( preg_match('/^d{1,1}[0-9]{5,10}$/', $_GET['reg_id'] ) ) {
+ // dId2 A artifical & anonymous
+ goaway(z_root() . '/regate/' . bin2hex($_GET['reg_id']) . 'a' );
+ }
+ notice(t('Identity unknown') . EOL);
+ }
+
+ $o = replace_macros(get_markup_template('plain.tpl'), [
+ '$title' => t('Your Registration ID'),
+ '$now' => '<form action="regate" method="get"><input type="text" name="reg_id" class="form-control form-group"><button class="btn btn-primary float-right">Submit</button></form>'
+ ]);
+
+ return $o;
+ }
+
if ( argc() > 1 ) {
$did2 = hex2bin( substr( argv(1), 0, -1) );
$didx = substr( argv(1), -1 );
@@ -306,7 +327,7 @@ class Regate extends \Zotlabs\Web\Controller {
$o = replace_macros(get_markup_template('regate.tpl'), [
'$form_security_token' => get_form_security_token("regate"),
'$title' => $title,
- '$desc' => $pin ? t('Please enter your validation token') . '<code class="inline">' . $pin . '</code>' : t('You were given a validation token. Please enter that token here to verify your registration.'),
+ '$desc' => $pin ? t('Please enter your validation token') . ' <code class="inline-code">' . $pin . '</code>' : t('Please enter your validation token'),
'$did2' => bin2hex($did2) . $didx,
'$now' => $nowfmt,
'$atform' => $atform,