ECJiaWiki:Api:user_init_user_api

来自ECJiaWiki
跳到导航 跳到搜索

应用场景

获取会员初始化对象

接口名称

init_user

请求参数

字段名 变量名 必填 类型 示例值 描述
目录名 user string 目录名
红包序列号 init_user string 红包序列号

举例如下

RC_Api::api('user', 'init_user')

成功举例如下

CONTENT: integrate_ecjia Object
(
    [is_ecjia:protected] => 1
    [db_host] => 
    [db_name] => 
    [db_user] => 
    [db_pass] => 
    [prefix] => 
    [charset] => UTF8
    [cookie_domain] => 
    [cookie_path] => /
    [user_table] => users
    [field_id] => user_id
    [field_name] => user_name
    [field_pass] => password
    [field_email] => email
    [field_gender] => sex
    [field_bday] => birthday
    [field_reg_date] => reg_time
    [need_sync] => 
    [error] => 0
    [db:protected] => users_model Object
        (
            [table_name] => ecjia_users
            [db_config:protected] => Array
                (
                    [sqlite] => Array
                        (
                            [driver] => sqlite
                            [database] => E:\WWW\ecjia-cityo2o\vendor\royalcms\framework\Royalcms\Component\Config\Resources/../database/production.sqlite
                            [prefix] => 
                        )

                    [mysql] => Array
                        (
                            [driver] => mysql
                            [host] => localhost
                            [database] => geshu
                            [username] => root
                            [password] => 123456
                            [charset] => utf8mb4
                            [collation] => utf8mb4_unicode_ci
                            [prefix] => ecjia_
                            [port] => 3306
                        )

                    [pgsql] => Array
                        (
                            [driver] => pgsql
                            [host] => localhost
                            [database] => database
                            [username] => root
                            [password] => 
                            [charset] => utf8
                            [prefix] => 
                            [schema] => public
                        )

                    [sqlsrv] => Array
                        (
                            [driver] => sqlsrv
                            [host] => localhost
                            [database] => database
                            [username] => root
                            [password] => 
                            [prefix] => 
                        )

                )

            [db:protected] => Royalcms\Component\Model\Database\Mysqli Object
                (
                    [link] => mysqli Object
                        (
                            [affected_rows] => 35
                            [client_info] => mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $
                            [client_version] => 50010
                            [connect_errno] => 0
                            [connect_error] => 
                            [errno] => 0
                            [error] => 
                            [error_list] => Array
                                (
                                )

                            [field_count] => 6
                            [host_info] => localhost via TCP/IP
                            [info] => 
                            [insert_id] => 0
                            [server_info] => 5.5.40
                            [server_version] => 50540
                            [stat] => Uptime: 9517  Threads: 1  Questions: 2771  Slow queries: 0  Opens: 93  Flush tables: 1  Open tables: 3  Queries per second avg: 0.291
                            [sqlstate] => 00000
                            [protocol_version] => 10
                            [thread_id] => 107
                            [warning_count] => 0
                        )

                    [hostkey:protected] => localhost#geshu
                    [fields] => Array
                        (
                            [0] => user_id
                            [1] => email
                            [2] => user_name
                            [3] => password
                            [4] => avatar_img
                            [5] => question
                            [6] => answer
                            [7] => sex
                            [8] => birthday
                            [9] => user_money
                            [10] => frozen_money
                            [11] => pay_points
                            [12] => rank_points
                            [13] => address_id
                            [14] => reg_time
                            [15] => last_login
                            [16] => last_time
                            [17] => last_ip
                            [18] => visit_count
                            [19] => user_rank
                            [20] => is_special
                            [21] => ec_salt
                            [22] => salt
                            [23] => parent_id
                            [24] => flag
                            [25] => alias
                            [26] => msn
                            [27] => qq
                            [28] => office_phone
                            [29] => home_phone
                            [30] => mobile_phone
                            [31] => is_validated
                            [32] => credit_line
                            [33] => passwd_question
                            [34] => passwd_answer
                        )

                    [primary] => user_id
                    [opt] => Array
                        (
                            [table] => ecjia_users
                            [primary] => user_id
                            [field] => *
                            [fields] => Array
                                (
                                    [0] => user_id
                                    [1] => email
                                    [2] => user_name
                                    [3] => password
                                    [4] => avatar_img
                                    [5] => question
                                    [6] => answer
                                    [7] => sex
                                    [8] => birthday
                                    [9] => user_money
                                    [10] => frozen_money
                                    [11] => pay_points
                                    [12] => rank_points
                                    [13] => address_id
                                    [14] => reg_time
                                    [15] => last_login
                                    [16] => last_time
                                    [17] => last_ip
                                    [18] => visit_count
                                    [19] => user_rank
                                    [20] => is_special
                                    [21] => ec_salt
                                    [22] => salt
                                    [23] => parent_id
                                    [24] => flag
                                    [25] => alias
                                    [26] => msn
                                    [27] => qq
                                    [28] => office_phone
                                    [29] => home_phone
                                    [30] => mobile_phone
                                    [31] => is_validated
                                    [32] => credit_line
                                    [33] => passwd_question
                                    [34] => passwd_answer
                                )

                            [where] => 
                            [like] => 
                            [group] => 
                            [having] => 
                            [order] => 
                            [limit] => 
                            [in] => 
                            [cache] => 
                            [filter_func] => Array
                                (
                                )

                        )

                    [opt_old] => Array
                        (
                            [table] => ecjia_users
                            [primary] => user_id
                            [field] => *
                            [fields] => Array
                                (
                                    [0] => user_id
                                    [1] => email
                                    [2] => user_name
                                    [3] => password
                                    [4] => avatar_img
                                    [5] => question
                                    [6] => answer
                                    [7] => sex
                                    [8] => birthday
                                    [9] => user_money
                                    [10] => frozen_money
                                    [11] => pay_points
                                    [12] => rank_points
                                    [13] => address_id
                                    [14] => reg_time
                                    [15] => last_login
                                    [16] => last_time
                                    [17] => last_ip
                                    [18] => visit_count
                                    [19] => user_rank
                                    [20] => is_special
                                    [21] => ec_salt
                                    [22] => salt
                                    [23] => parent_id
                                    [24] => flag
                                    [25] => alias
                                    [26] => msn
                                    [27] => qq
                                    [28] => office_phone
                                    [29] => home_phone
                                    [30] => mobile_phone
                                    [31] => is_validated
                                    [32] => credit_line
                                    [33] => passwd_question
                                    [34] => passwd_answer
                                )

                            [where] => 
                            [like] => 
                            [group] => 
                            [having] => 
                            [order] => 
                            [limit] => 
                            [in] => 
                            [cache] => 
                            [filter_func] => Array
                                (
                                )

                        )

                    [last_query] => mysqli_result Object
                        (
                            [current_field] => 
                            [field_count] => 
                            [lengths] => 
                            [num_rows] => 
                            [type] => 
                        )

                    [last_sql] => show columns from ecjia_users
                    [error] => 
                    [table_name:protected] => ecjia_users
                    [db_tablepre:protected] => ecjia_
                    [cache_time:protected] => 
                    [config:protected] => Array
                        (
                            [driver] => mysql
                            [host] => localhost
                            [database] => geshu
                            [username] => root
                            [password] => 123456
                            [charset] => utf8mb4
                            [collation] => utf8mb4_unicode_ci
                            [prefix] => ecjia_
                            [port] => 3306
                        )

                    [condition:protected] => Array
                        (
                            [eq] =>  = 
                            [neq] =>  <> 
                            [gt] =>  > 
                            [egt] =>  >= 
                            [lt] =>  < 
                            [elt] =>  <= 
                            [like] =>  like 
                        )

                    [db:protected] => 
                )

            [db_setting:protected] => mysql
            [table_short_name:protected] => users
            [table_full_name:protected] => `geshu`.ecjia_users
            [db_tablepre] => ecjia_
            [error] => 
            [trigger] => 1
            [join_table] => Array
                (
                )

            [data] => Array
                (
                )

            [validate] => Array
                (
                )

            [auto] => Array
                (
                )

            [map] => Array
                (
                )

        )

    [ec_salt] => ec_salt
)

失败举例如下

CONTENT: bool(false)

注:错误编码