Zend framework2 ZfcUser-注册时状态始终为空

Zend framework2 ZfcUser-注册时状态始终为空,zend-framework2,zfcuser,Zend Framework2,Zfcuser,我正试图在我的第一个Zend Framework 2项目中实现ZfcUser。我已经运行SQL来创建用户表,并将zfcuser.global.php复制到autoload文件夹中。我想在数据库中使用“state”列,我想如果我在zfcuser.global.php中更改以下3个条目,当用户注册时,数据库中的state将自动为1,但我得到的是null。我试图通过互联网进行搜索,但似乎没有其他人有这个问题。我做错了什么?有什么建议吗?或者我是否假设某件事没有发生 /** * Enable user

我正试图在我的第一个Zend Framework 2项目中实现ZfcUser。我已经运行SQL来创建用户表,并将zfcuser.global.php复制到autoload文件夹中。我想在数据库中使用“state”列,我想如果我在zfcuser.global.php中更改以下3个条目,当用户注册时,数据库中的state将自动为1,但我得到的是null。我试图通过互联网进行搜索,但似乎没有其他人有这个问题。我做错了什么?有什么建议吗?或者我是否假设某件事没有发生

/**
 * Enable user state usage
 * 
 * Should user's state be used in the registration/login process?
 */
'enable_user_state' => true,

/**
 * Default user state upon registration
 * 
 * What state user should have upon registration?
 * Allowed value type: integer
 */
'default_user_state' => 1,

/**
 * States which are allowing user to login
 * 
 * When user tries to login, is his/her state one of the following?
 * Include null if you want user's with no state to login as well.
 * Allowed value types: null and integer
 */
'allowed_login_states' => array( 1 ),

您正在覆盖用户服务吗?你用的是什么版本?这是我在作曲时用的,我想我用这个来拉最新的版本吧?“zendframework/zendframework”:“2.3.*”,“zf commons/zfc user”:“dev master”,否则我没有做任何额外的更改。我如何知道是否覆盖了用户服务?对不起,我还是一个初学者…我有自己的用户实体(这是否意味着我覆盖了用户服务?),但已经从zfcUser实体复制了setState()和getState(),但在数据库中仍然为空。