ZfcUser - 注册时状态始终为null

时间:2014-08-25 11:52:47

标签: zend-framework2 zfcuser

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

/**
 * 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 ),

0 个答案:

没有答案