]> git.mxchange.org Git - friendica.git/blobdiff - mod/regmod.php
The first queries are replaced with the new functions. More to come ...
[friendica.git] / mod / regmod.php
index 34d29a77cecfee8360b9d2e63822876483a47e41..884790458127285eba43016e92f0e31abb3968e3 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use Friendica\App;
+
 require_once('include/enotify.php');
 require_once('include/user.php');
 
@@ -12,15 +14,17 @@ function user_allow($hash) {
        );
 
 
-       if(! count($register))
+       if (! dbm::is_result($register)) {
                return false;
+       }
 
        $user = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
                intval($register[0]['uid'])
        );
 
-       if(! count($user))
+       if (! dbm::is_result($user)) {
                killme();
+       }
 
        $r = q("DELETE FROM `register` WHERE `hash` = '%s'",
                dbesc($register[0]['hash'])
@@ -70,7 +74,7 @@ function user_deny($hash) {
                dbesc($hash)
        );
 
-       if(! count($register))
+       if(! dbm::is_result($register))
                return false;
 
        $user = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
@@ -95,7 +99,7 @@ function user_deny($hash) {
 
 }
 
-function regmod_content(&$a) {
+function regmod_content(App $a) {
 
        global $lang;