]> git.mxchange.org Git - friendica.git/commitdiff
fix register loophole
authorMike Macgirvin <mike@macgirvin.com>
Sun, 11 Jul 2010 10:35:33 +0000 (03:35 -0700)
committerMike Macgirvin <mike@macgirvin.com>
Sun, 11 Jul 2010 10:35:33 +0000 (03:35 -0700)
mod/contacts.php
mod/register.php

index 5bf906e060f6bd5daf61e5281bca6baf01f66a4e..999617aa19d155328ca638096cc51e7409fad362 100644 (file)
@@ -176,7 +176,8 @@ function contacts_content(&$a) {
                        '$photo' => $r[0]['photo'],
                        '$name' => $r[0]['name'],
                        '$dir_icon' => $dir_icon,
-                       '$alt_text' => $alt_text
+                       '$alt_text' => $alt_text,
+                       '$url' => (($direction != DIRECTION_IN) ? "redir/{$r[0]['id']}" : $r[0]['url'] )
 
                ));
 
index 8678614ac9f695f39ceb000832ab327e905ca820..2e5d02273a002ee10b4a239a52b0fd980eb22094 100644 (file)
@@ -175,6 +175,11 @@ function register_post(&$a) {
 if(! function_exists('register_content')) {
 function register_content(&$a) {
 
+       if($a->config['register_policy'] == REGISTER_CLOSED) {
+               notice("Permission denied." . EOL);
+               return;
+       }
+
        $o = file_get_contents("view/register.tpl");
        $o = replace_macros($o, array('$registertext' =>((x($a->config,'register_text'))? $a->config['register_text'] : "" )));
        return $o;