使用onUserAfterSave创建joomla插件时的mysql错误

巴斯范登迪肯伯格

我制作了一个插件,可以对我们的XML服务器进行身份验证,就像魅力一样。但是现在我正在尝试为onUserAfterSave函数制作插件,这样我就可以进行登录后处理,例如将用户分配到其中一个。

但是ik无法获得基本的帮助。

xml文件中的引爆定义如下所示:

<extension version="3.1" type="plugin" group="user">

和这样的PHP文件

    // No direct access
    defined('_JEXEC') or die;
    //include_once "functions.php";

    /**
     * HCC XML-RPC login handler plugin
     *
     * @package Joomla.Plugin
     * @subpackage  User.hcc_xml_handler
     * @since 3.1
     */
    class PlgUserhcc_xml_handler extends JPlugin
    {
        /**
        * This plug process the extra login information.
        *
        *
        * @param   array    $user     Holds the new user data.
        * @param   boolean  $isnew    True if a new user is stored.
        * @param   boolean  $success  True if user was succesfully stored in the database.
        * @param   string   $msg      Message.
        *
        * @return  void
        *
        * @since   1.6
        */
        public function onUserAfterSave($user, $isnew, $success, $msg)
        {
            /*
            $debug = $this->params->get('debug', '0');
            if ($debug == '1')
            {$debugfile = $this->params->get('debugfile', '');}
            else{$debugfile = "";}

            $debug = $this->params->get('debug', '0');
            */
            $debug = '1';
            $debugfile = "/disk/site/hcc.nl/poc-groepen/logging/hcc_xml_handler-debug.log";
            if ($debug == '1')
            {
                // set debug log file if debug is enabled
                $debugstartmsg  = "=====================================\n";
                $debugstartmsg .= "= start hcc_xml_handler.php aanroep =\n";
                $debugstartmsg .= "=====================================\n";
                file_put_contents($debugfile, $debugstartmsg, FILE_APPEND | LOCK_EX);
            }

            if (!$success)
            {
                if ($debug == '1')
                {
                    $debugsuccessmsg = "login gelukt" ;
                    file_put_contents($debugfile, $debugsuccessmsg, FILE_APPEND | LOCK_EX);
                }
                return false;
            }
            if ($isnew)
            {
                if ($debug == '1')
                {
                    $debugnewsmsg = "login NEW" ;
                    file_put_contents($debugfile, $debugnewsmsg, FILE_APPEND | LOCK_EX);
                }
            return false;
            }
            if ($debug == '1')
            {
                // set debug log file if debug is enabled
                $debugstopmsg  = "=====================================\n";
                $debugstopmsg .= "=  stop hcc_xml_handler.php aanroep =\n";
                $debugstopmsg .= "=====================================\n";
                file_put_contents($debugfile, $debugstopmsg, FILE_APPEND | LOCK_EX);
            }


        }
    }

我究竟做错了什么 ?

我在记录中看到的错误是:

mysqli_fetch_row()期望参数1为mysqli_result,在第785行的/www/libraries/joomla/database/driver/mysqli.php中给出的布尔值,引用:https: //someurl.hcc.nl/ mysqli_free_result()期望参数1为是mysqli_result,在第828行的/www/libraries/joomla/database/driver/mysqli.php中给出的布尔值,引荐网址https ://someurl.hcc.nl/

任何一个想法?

巴斯范登迪肯伯格

我切换到对我有用的onUserAfterLogin函数

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

在安装时使用自定义顺序创建自定义插件joomla

来自分类Dev

创建Bukkit插件时Maven错误

来自分类Dev

使用Laravel迁移创建外键时出现MySQL错误

来自分类Dev

使用phpmyadmin创建表时出现MySQL错误#1016

来自分类Dev

使用Laravel迁移创建外键时出现MySQL错误

来自分类Dev

使用jQuery printElement插件时出现错误

来自分类Dev

MathJax 插件创建错误

来自分类Dev

使用Nginx而不是Apache设置Joomla时出现随机错误

来自分类Dev

使用Nginx而不是Apache设置Joomla时出现随机错误

来自分类Dev

使用MySQL创建表错误

来自分类Dev

尝试创建表时出现MySQL错误

来自分类Dev

创建函数时出现MYSQL 1064错误

来自分类Dev

#1604创建外键时的mysql错误

来自分类Dev

尝试创建表时出现MySQL错误

来自分类Dev

创建表MySQL时出现错误1604

来自分类Dev

创建函数时出现 MySQL 错误 1064

来自分类Dev

创建 mysql 过程时出现错误 1064

来自分类Dev

为什么在创建jQuery插件时使用每个

来自分类Dev

在创建记录“创建”时错误地触发了CRM插件“更新”

来自分类Dev

使用Gradle和Flyway插件创建MySQL模式

来自分类Dev

使用-g安装插件时,node.js npm错误

来自分类Dev

Memcache在使用acts_as_cached插件时获取错误的值

来自分类Dev

使用requirejs异步插件时捕获Google Maps API错误

来自分类Dev

使用带有响应的jQuery插件时导入错误

来自分类Dev

使用-g安装插件时,node.js npm错误

来自分类Dev

在phonegap中使用sqlite插件时出现Ajax错误

来自分类Dev

使用 vim-syntastic 插件时出现逗号错误

来自分类Dev

使用Java在MySQL中创建表时未选择数据库错误

来自分类Dev

我是使用mysql的新手-当我尝试创建表时,出现以下错误

Related 相关文章

热门标签

归档