Menu

Cannot override credentials

Help
2014-10-06
2014-10-12
  • Paul Raines

    Paul Raines - 2014-10-06

    I am trying to change the default server from 'localhost' to 'mysql' so I tried this

    <?php
    
    function adminer_object() {
        // required to run any plugin
        include_once "./plugins/plugin.php";
    
        // autoloader
        foreach (glob("plugins/*.php") as $filename) {
            include_once "./$filename";
        }
    
        $plugins = array(
            // specify enabled plugins here
            new AdminerDumpXml,
            /* new AdminerFileUpload("data/"), */
        );
    
        class AdminerCustomization extends AdminerPlugin {
    
          function credentials() {
            return array('mysql','','');
          }
    
        }
        return new AdminerCustomization($plugins);
    }
    
    // include original Adminer or Adminer Editor
    include "./adminer.php";
    ?>
    

    But when I load it the server still comes up as 'localhost'. What am I doing wrong?

    Also, how would I totally disable the ability of users to use permanent login.

    Thanks

     
    • Jakub Vrána

      Jakub Vrána - 2014-10-12

      You can override loginForm() to achieve both goals.

      Jakub

      On 10/06/2014 10:43 AM, Paul Raines wrote:

      I am trying to change the default server from 'localhost' to 'mysql' so I tried this

      ~~~~
      <?php

      function adminer_object() {
      // required to run any plugin
      include_once "./plugins/plugin.php";

       // autoloader
       foreach (glob("plugins/*.php") as $filename) {
           include_once "./$filename";
       }
      
       $plugins = array(
           // specify enabled plugins here
           new AdminerDumpXml,
           /* new AdminerFileUpload("data/"), */
       );
      
       class AdminerCustomization extends AdminerPlugin {
      
         function credentials() {
           return array('mysql','','');
         }
      
       }
       return new AdminerCustomization($plugins);
      

      }

      // include original Adminer or Adminer Editor
      include "./adminer.php";
      ?>
      ~~~~

      But when I load it the server still comes up as 'localhost'. What am I doing wrong?

      Also, how would I totally disable the ability of users to use permanent login.

      Thanks


      Cannot override credentials


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/adminer/discussion/960418/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

Log in to post a comment.