0

嗨,我正在使用 ajaxplorer,这里我想使用 mysql 数据库表登录到 ajaxplorer.. 这是表结构

CREATE TABLE IF NOT EXISTS `user` (
`Guid` char(38) COLLATE latin1_general_ci NOT NULL,
`UserName` varchar(250) COLLATE latin1_general_ci NOT NULL,
`Organization` char(38) COLLATE latin1_general_ci DEFAULT NULL,
`rsguid` char(38) COLLATE latin1_general_ci NOT NULL,
`temppassword` varchar(50) COLLATE latin1_general_ci NOT NULL,
`SessionExpires` datetime DEFAULT NULL,
`IsAdmin` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`Guid`)
)  

这里用户名是“admin”,临时密码是“ajaxplorer”,使用用户表中的这些凭据我想登录 ajaxplorer..

请帮帮我

4

1 回答 1

0

1:将bootstrap_plugins.php中的auth驱动和conf驱动替换为:

    "CONF_DRIVER" => array(
        "NAME"      => "sql",
        "OPTIONS"   => array(
            "SQL_DRIVER"    => array(
                "driver"    => "mysql",
                "host"      => "db_server",
                "database"  => "db_name",
                "user"      => "db_username",
                "password"  => "db_password",
            ),
            )
),    

"AUTH_DRIVER" => array(
            "NAME"          => "sql",
             "OPTIONS"       => array(
            "SLAVE_MODE"  => true,  
                "SQL_DRIVER"    => array(
                                        "driver"    => "mysql",
                                        "host"      => "db_server",
                                        "database"  => "db_name",
                                        "user"      => "db_username",
                                        "password"  => "db_password"
                                            ),

               "TRANSMIT_CLEAR_PASS"   => false  // Don't touch this. It's unsafe (and useless here) to transmit clear password.
                                        )
                ),

2:您可以在 pligins/auth.sql/class.sqlAuthDriver.php 中找到有关用户表和列名的所有查询,您可以根据需要自定义它们,例如将“ajaxp_user”重命名为“user”等。

于 2012-09-14T15:02:48.680 回答