Merge pull request #3665 from annando/local-remote-user
Bugfix: You cannot be local and remote at the same time
This commit is contained in:
commit
0c1c39b679
4
boot.php
4
boot.php
|
@ -947,6 +947,10 @@ function public_contact() {
|
||||||
* @return int|bool visitor_id or false
|
* @return int|bool visitor_id or false
|
||||||
*/
|
*/
|
||||||
function remote_user() {
|
function remote_user() {
|
||||||
|
// You cannot be both local and remote
|
||||||
|
if (local_user()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if ((x($_SESSION, 'authenticated')) && (x($_SESSION, 'visitor_id'))) {
|
if ((x($_SESSION, 'authenticated')) && (x($_SESSION, 'visitor_id'))) {
|
||||||
return intval($_SESSION['visitor_id']);
|
return intval($_SESSION['visitor_id']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue