12-30-2016, 05:09 PM
I would get those two functions out of the db class and put them in usersc/includes/custom_functions.php. I redid them for you...
https://hastebin.com/wokaqataji.xml
https://hastebin.com/wokaqataji.xml