$_SESSION['mobile-theme'] = get_pconfig($user_record['uid'], 'system', 'mobile_theme');
$_SESSION['authenticated'] = 1;
$_SESSION['page_flags'] = $user_record['page-flags'];
- $_SESSION['my_url'] = $a->get_baseurl() . '/profile/' . $user_record['nickname'];
- $_SESSION['my_address'] = $user_record['nickname'] . '@' . substr($a->get_baseurl(),strpos($a->get_baseurl(),'://')+3);
+ $_SESSION['my_url'] = App::get_baseurl() . '/profile/' . $user_record['nickname'];
+ $_SESSION['my_address'] = $user_record['nickname'] . '@' . substr(App::get_baseurl(),strpos(App::get_baseurl(),'://')+3);
$_SESSION['addr'] = $_SERVER['REMOTE_ADDR'];
$a->user = $user_record;
$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;
call_hooks('logged_in', $a->user);
if(($a->module !== 'home') && isset($_SESSION['return_url']))
- goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
+ goaway(App::get_baseurl() . '/' . $_SESSION['return_url']);
}
}
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);
}
logger('check_form_security_token failed: user ' . $a->user['guid'] . ' - form element ' . $typename);
logger('check_form_security_token failed: _REQUEST data: ' . print_r($_REQUEST, true), LOGGER_DATA);
notice( check_form_security_std_err_msg() );
- goaway($a->get_baseurl() . $err_redirect );
+ goaway(App::get_baseurl() . $err_redirect );
}
}
function check_form_security_token_ForbiddenOnErr($typename = '', $formname = 'form_security_token') {
WHERE `contact-id` = %d ",
intval($contact_id)
);
- if(count($r)) {
+ if (dbm::is_result($r)) {
foreach($r as $rr)
$groups[] = $rr['gid'];
}