]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
eradicate redundant get_uid function
[friendica.git] / boot.php
index eb3d1b06e3d898a9e424b27c324937b786153ecc..b3d116a50a0e72ec57d861d4e6feaebd0adcbbf7 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -567,7 +567,7 @@ function xml_status($st, $message = '') {
 if(! function_exists('local_user')) {
 function local_user() {
        if((x($_SESSION,'authenticated')) && (x($_SESSION,'uid')))
-               return $_SESSION['uid'];
+               return intval($_SESSION['uid']);
        return false;
 }}
 
@@ -576,7 +576,7 @@ function local_user() {
 if(! function_exists('remote_user')) {
 function remote_user() {
        if((x($_SESSION,'authenticated')) && (x($_SESSION,'visitor_id')))
-               return $_SESSION['visitor_id'];
+               return intval($_SESSION['visitor_id']);
        return false;
 }}
 
@@ -1023,13 +1023,6 @@ function photo_new_resource() {
 }}
 
 
-// Returns logged in user ID
-
-if(! function_exists('get_uid')) {
-function get_uid() {
-       return ((x($_SESSION,'uid')) ? intval($_SESSION['uid']) : 0) ;
-}}
-
 // Take a URL from the wild, prepend http:// if necessary
 // and check DNS to see if it's real
 // return true if it's OK, false if something is wrong with it