Moved insert user sql function to mysql object.