You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of using array_replace_recursive to set all the defaults every time the module loads should switch the code to use the Module::getSetting() and related functions ie. getRegistrationSetting()
So in the controller you would use
$this->module->getSocialSetting('enabled');
This way the defaults are only loaded when needed.
Or we could remove the getSocialSettings and variable from the module and make components out of all the settings and attach them to the user component.
Yii::$app->user->social->enabled;
This way components and defaults are only set when needed.
The text was updated successfully, but these errors were encountered:
Yes social auth has been redone by me. It should work - need to add all the Auth clients (have done for Google, Facebook and Twitter).
Following needs to be noted and done:
Removing array_replace_recursive would adversely impact many code areas including defaults that are used in views, widgets as well. Need to be really careful in doing this.
Testing is important from here. Would suggest if you can help build test cases in a new folder tests to test each of these. I can help add and augment the same as well.
Instead of using array_replace_recursive to set all the defaults every time the module loads should switch the code to use the
Module::getSetting()
and related functions ie.getRegistrationSetting()
So in the controller you would use
This way the defaults are only loaded when needed.
Or we could remove the getSocialSettings and variable from the module and make components out of all the settings and attach them to the user component.
This way components and defaults are only set when needed.
The text was updated successfully, but these errors were encountered: