user-management icon indicating copy to clipboard operation
user-management copied to clipboard

Fix registration when useEmailAsLogin is true

Open margori opened this issue 8 years ago • 2 comments

I set enableRegistration = true and useEmailAsLogin = true in config then try to register but had this exception Database Exception – yii\db\Exception SQLSTATE[HY000]: General error: 1364 Field 'username' doesn't have a default value The SQL being executed was: INSERT INTO user (email, status, confirmation_token, registration_ip, auth_key, password_hash, created_at, updated_at) VALUES ('[email protected]', 0, 'KDsZuiL2sZRFY7tJiCnU7F-AKqpTOrYD_1502566426', '127.0.0.1', '87i6gDXQydakT53XgOWZT0tya7INq0go', '$2y$13$z3qDng4W4TBEwza28IcjV.zm59kHsTMDH4Y3O9D8.aRkQrKTFyUJu', 1502566430, 1502566430)

so this is me fix to it.

margori avatar Aug 12 '17 19:08 margori

Bumping for a another review or definition. Thanks.

margori avatar Oct 23 '17 02:10 margori

Bump

margori avatar Jun 12 '21 22:06 margori