Redirect profiles list to default profile, when multi_profiles is disabled.
This commit is contained in:
parent
0185f867bb
commit
e6364f6680
|
@ -726,8 +726,22 @@ function profiles_content(&$a) {
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Profiles list.
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
//If we don't support multi profiles, don't display this list.
|
||||||
|
if(!feature_enabled(local_user(),'multi_profiles')){
|
||||||
|
$r = q(
|
||||||
|
"SELECT * FROM `profile` WHERE `uid` = %d AND `is-default`=1",
|
||||||
|
local_user()
|
||||||
|
);
|
||||||
|
if(count($r)){
|
||||||
|
//Go to the default profile.
|
||||||
|
goaway($a->get_baseurl(true) . '/profiles/'.$r[0]['id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$r = q("SELECT * FROM `profile` WHERE `uid` = %d",
|
$r = q("SELECT * FROM `profile` WHERE `uid` = %d",
|
||||||
local_user());
|
local_user());
|
||||||
if(count($r)) {
|
if(count($r)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user