public function forceUniqueUserNames()
    {
        //Check for not unique index in user table
        $userLoginIndex = $this->db->get_row("SHOW INDEX FROM " . $this->db->users . " WHERE Key_name = 'user_login_key' AND Non_unique = 1");

        if (is_object($userLoginIndex) && !empty($userLoginIndex)) {

            //Remove old index
            $this->db->query("ALTER TABLE " . $this->db->users . " DROP INDEX user_login_key");

            //Add new index
            $this->db->query("ALTER TABLE " . $this->db->users . " ADD UNIQUE user_login_key (user_login);");
        }
    }