]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Register.php
Merge pull request #10092 from annando/fix-pleroma-mention
[friendica.git] / src / Module / Register.php
index dd603ad206a803a024f8094ea5df83e3874bbdb8..52654754a7926d857923af2b22960ad5b8d1a8ee 100644 (file)
@@ -132,7 +132,7 @@ class Register extends BaseModule
                $o = Renderer::replaceMacros($tpl, [
                        '$invitations'  => DI::config()->get('system', 'invitation_only'),
                        '$permonly'     => intval(DI::config()->get('config', 'register_policy')) === self::APPROVE,
-                       '$permonlybox'  => ['permonlybox', DI::l10n()->t('Note for the admin'), '', DI::l10n()->t('Leave a message for the admin, why you want to join this node'), 'required'],
+                       '$permonlybox'  => ['permonlybox', DI::l10n()->t('Note for the admin'), '', DI::l10n()->t('Leave a message for the admin, why you want to join this node'), DI::l10n()->t('Required')],
                        '$invite_desc'  => DI::l10n()->t('Membership on this site is by invitation only.'),
                        '$invite_label' => DI::l10n()->t('Your invitation code: '),
                        '$invite_id'    => $invite_id,
@@ -184,8 +184,6 @@ class Register extends BaseModule
        {
                BaseModule::checkFormSecurityTokenRedirectOnError('/register', 'register');
 
-               $a = DI::app();
-
                $arr = ['post' => $_POST];
                Hook::callAll('register_post', $arr);
 
@@ -367,17 +365,15 @@ class Register extends BaseModule
                        // send notification to admins
                        while ($admin = DBA::fetch($admins_stmt)) {
                                \notification([
-                                       'type'         => Model\Notify\Type::SYSTEM,
+                                       'type'         => Model\Notification\Type::SYSTEM,
                                        'event'        => 'SYSTEM_REGISTER_REQUEST',
+                                       'uid'          => $admin['uid'],
+                                       'link'         => $base_url . '/admin/users/',
                                        'source_name'  => $user['username'],
                                        'source_mail'  => $user['email'],
                                        'source_nick'  => $user['nickname'],
                                        'source_link'  => $base_url . '/admin/users/',
-                                       'link'         => $base_url . '/admin/users/',
                                        'source_photo' => $base_url . '/photo/avatar/' . $user['uid'] . '.jpg',
-                                       'to_email'     => $admin['email'],
-                                       'uid'          => $admin['uid'],
-                                       'language'     => ($admin['language'] ?? '') ?: 'en',
                                        'show_in_notification_page' => false
                                ]);
                        }