Used more dbm::is_result() instead of (!$r) or (!count($r)), still there are
more pending ... Also put SQL table columns into back-ticks. Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
c43389f79a
commit
a96eb3428d
11 changed files with 20 additions and 19 deletions
|
@ -12,14 +12,14 @@ 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'",
|
||||
|
@ -69,7 +69,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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue