]> git.mxchange.org Git - friendica.git/blobdiff - mod/regmod.php
new item view: sparkle links not redirecting
[friendica.git] / mod / regmod.php
index 772351ac55ab477bf4af2bafb1007be2a6f0512e..00cfa06e21e45b115962abae7ef7fb604c8826dc 100644 (file)
@@ -12,6 +12,11 @@ function regmod_content(&$a) {
                return $o;
        }
 
+       if((! (x($a->config,'admin_email'))) || ($a->config['admin_email'] !== $a->user['email'])) {
+               notice( t('Permission denied.') . EOL);
+               return '';
+       }
+
        if($a->argc != 3)
                killme();
 
@@ -65,6 +70,15 @@ function regmod_content(&$a) {
                        intval($register[0]['uid'])
                );
                
+               $r = q("SELECT * FROM `profile` WHERE `uid` = %d AND `is-default` = 1",
+                       intval($user[0]['uid'])
+               );
+               if(count($r) && $r[0]['net-publish']) {
+                       $url = $a->get_baseurl() . '/profile/' . $user[0]['nickname'];
+                       if($url && strlen(get_config('system','directory_submit_url')))
+                               proc_run('php',"include/directory.php","$url");
+               }
+
                $email_tpl = load_view_file("view/register_open_eml.tpl");
                $email_tpl = replace_macros($email_tpl, array(
                                '$sitename' => $a->config['sitename'],