Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default_user_state = 0 not supported #523

Closed
Gounlaf opened this issue Sep 20, 2014 · 4 comments
Closed

default_user_state = 0 not supported #523

Gounlaf opened this issue Sep 20, 2014 · 4 comments
Labels
Milestone

Comments

@Gounlaf
Copy link

Gounlaf commented Sep 20, 2014

Hi,
I tried to set default_user_state = 0, but it's make state = null in database

I think the cause is : ZfcUser/Service/User.php ; line 91 to 96

// If user state is enabled, set the default state value
if ($this->getOptions()->getEnableUserState()) {
     if ($this->getOptions()->getDefaultUserState()) {
        $user->setState($this->getOptions()->getDefaultUserState());
    }
}

Line 93 ($this->getOptions()->getDefaultUserState()) doesn't work with null/0 value

Am I wrong ?
Thanks

@Danielss89
Copy link
Member

Yes you are right, this is a bug. Can you fix in PR?

@Gounlaf
Copy link
Author

Gounlaf commented Sep 21, 2014

@Danielss89 I will =)

Edit: It was for v1.2.1 ; i will try to find if it's steel present in master

@Gounlaf
Copy link
Author

Gounlaf commented Sep 21, 2014

getDefaultUserState() is no longer used in master =/

@Danielss89
Copy link
Member

Nop, userstate has been removed from master(2.0.0), but there's a branch for 1.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants