]> git.mxchange.org Git - friendica.git/blobdiff - mod/regmod.php
More usage of dbm::is_result($r) instead of count($r):
[friendica.git] / mod / regmod.php
index 2e3ca414e3408277425cea9477a2a9000e10b1fd..f37953ac50fc430e2b0703832f4a3827771276b2 100644 (file)
@@ -3,7 +3,6 @@
 require_once('include/enotify.php');
 require_once('include/user.php');
 
-if(! function_exists('user_allow')) {
 function user_allow($hash) {
 
        $a = get_app();
@@ -35,10 +34,10 @@ function user_allow($hash) {
        $r = q("SELECT * FROM `profile` WHERE `uid` = %d AND `is-default` = 1",
                intval($user[0]['uid'])
        );
-       if(count($r) && $r[0]['net-publish']) {
+       if(dbm::is_result($r) && $r[0]['net-publish']) {
                $url = $a->get_baseurl() . '/profile/' . $user[0]['nickname'];
                if($url && strlen(get_config('system','directory')))
-                       proc_run('php',"include/directory.php","$url");
+                       proc_run(PRIORITY_LOW, "include/directory.php", $url);
        }
 
        push_lang($register[0]['language']);
@@ -56,14 +55,14 @@ function user_allow($hash) {
                info( t('Account approved.') . EOL );
                return true;
        }
-}
+
 }
 
 
 // This does not have to go through user_remove() and save the nickname
 // permanently against re-registration, as the person was not yet
 // allowed to have friends on this system
-if(! function_exists('user_deny')) {
+
 function user_deny($hash) {
 
        $register = q("SELECT * FROM `register` WHERE `hash` = '%s' LIMIT 1",
@@ -92,10 +91,9 @@ function user_deny($hash) {
        );
        notice( sprintf(t('Registration revoked for %s'), $user[0]['username']) . EOL);
        return true;
-}
+
 }
 
-if(! function_exists('regmod_content')) {
 function regmod_content(&$a) {
 
        global $lang;
@@ -133,4 +131,3 @@ function regmod_content(&$a) {
                killme();
        }
 }
-}