🕸Fergus Duniho wrote on Thu, Apr 12, 2018 09:19 PM UTC:
While scouring the site for PHP scripts with mysql code, I came across a function called loggedinas(), which would return the userid or openid of the person signed in. Signing in with openid is no longer available due to changes made on the website that handles this. So a function that returns the openid of someone signed in is no longer useful. But in case it would be useful to have a function that returns the userid of the person signed in, I modified login() to return the userid of the person signed in if both arguments passed to it are empty strings, which by default they will be. So, login() called without arguments will return the userid of the person signed in if anyone is signed in. It will otherwise return false. For the sake of consistency, it will now use the userid as its true value, and it uses the boolean false for false.
While scouring the site for PHP scripts with mysql code, I came across a function called loggedinas(), which would return the userid or openid of the person signed in. Signing in with openid is no longer available due to changes made on the website that handles this. So a function that returns the openid of someone signed in is no longer useful. But in case it would be useful to have a function that returns the userid of the person signed in, I modified login() to return the userid of the person signed in if both arguments passed to it are empty strings, which by default they will be. So, login() called without arguments will return the userid of the person signed in if anyone is signed in. It will otherwise return false. For the sake of consistency, it will now use the userid as its true value, and it uses the boolean false for false.