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

Check if GRAV_USER_INSTANCE constants are already defined #2621

Merged
merged 1 commit into from
Aug 13, 2019

Conversation

Regaez
Copy link
Contributor

@Regaez Regaez commented Aug 13, 2019

Closes #2620

Small check to allow accounts to prevent a constant being defined again. This allows $grav['accounts'] to be accessed multiple times when new Grav::instance() are created, for example when unit testing.

@Regaez
Copy link
Contributor Author

Regaez commented Aug 13, 2019

Hmm. The CI build failed, but it seems unrelated to my change?

@rhukster rhukster merged commit 9fc37e4 into getgrav:develop Aug 13, 2019
@Regaez Regaez deleted the tt-2620-constant branch August 13, 2019 21:35
@mahagr
Copy link
Member

mahagr commented Aug 14, 2019

Just a note on this: you still cannot easily switch between those two; you are stuck on the account type you were using the first time.

The issue is that I had to make Grav\Common\User class to behave just like the old class was.

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

Successfully merging this pull request may close these issues.

Constant GRAV_USER_INSTANCE already defined
3 participants