$r = q("select * from user where uid = %d limit 1",
intval($_SESSION['submanage'])
);
- if(count($r))
+ if (dbm::is_result($r))
$master_record = $r[0];
}
dbesc($master_record['password']),
dbesc($master_record['email'])
);
- if($r && count($r))
+ if (dbm::is_result($r))
$a->identities = $r;
else
$a->identities = array();
and `manage`.`uid` = %d",
intval($master_record['uid'])
);
- if($r && count($r))
+ if (dbm::is_result($r))
$a->identities = array_merge($a->identities,$r);
if($login_initial)
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1",
intval($_SESSION['uid']));
- if(count($r)) {
+ if (dbm::is_result($r)) {
$a->contact = $r[0];
$a->cid = $r[0]['id'];
$_SESSION['cid'] = $a->cid;
header('X-Account-Management-Status: active; name="' . $a->user['username'] . '"; id="' . $a->user['nickname'] .'"');
if($login_initial || $login_refresh) {
- $l = get_browser_language();
- q("UPDATE `user` SET `login_date` = '%s', `language` = '%s' WHERE `uid` = %d",
+ q("UPDATE `user` SET `login_date` = '%s' WHERE `uid` = %d",
dbesc(datetime_convert()),
- dbesc($l),
intval($_SESSION['uid'])
);
intval(PAGE_COMMUNITY)
);
- if(count($r)) {
+ if (dbm::is_result($r)) {
$verified = 2;
return true;
}
intval($remote_user),
intval($owner_id)
);
- if(count($r)) {
+ if (dbm::is_result($r)) {
$remote_verified = true;
$groups = init_groups_visitor($remote_user);
}
intval($remote_user),
intval($owner_id)
);
- if(count($r)) {
+ if (dbm::is_result($r)) {
$remote_verified = true;
$groups = init_groups_visitor($remote_user);
}
WHERE `contact-id` = %d ",
intval($contact_id)
);
- if(count($r)) {
+ if (dbm::is_result($r)) {
foreach($r as $rr)
$groups[] = $rr['gid'];
}