]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - plugins/sql_auth/sql_auth.php
Warn about SQL_DEFAULT_USER being set in config.php.
[irc/unrealircd/unrealircd-webpanel.git] / plugins / sql_auth / sql_auth.php
index ececaec3b2561dcf67b2dab97a15f1bf119bd12e..a78a9d0c7c850a80c6fdd9090d9cdfb8b9dd24f4 100644 (file)
@@ -24,6 +24,7 @@ class sql_auth
                Hook::func(HOOKTYPE_GET_USER_LIST, 'sql_auth::get_user_list');
                Hook::func(HOOKTYPE_USER_DELETE, 'sql_auth::user_delete');
                Hook::func(HOOKTYPE_EDIT_USER, 'sql_auth::edit_core');
+               Hook::func(HOOKTYPE_PRE_OVERVIEW_CARD, 'sql_auth::add_pre_overview_card');
 
                if (defined('SQL_DEFAULT_USER')) // we've got a default account
                {
@@ -54,6 +55,12 @@ class sql_auth
                }
        }
 
+       public static function add_pre_overview_card($empty)
+       {
+               if (defined('SQL_DEFAULT_USER'))
+                       Message::Fail("Warning: SQL_DEFAULT_USER is set in config.php. You should remove that item now, as it is only used during installation.");
+       }
+
        /* pre-Header hook */
        public static function session_start($n)
        {