Hooks#onAuthPluginAutoCreate: Only act if not default

Change-Id: If52c23b523953aabf52ef3e889a77b422a149c63
This commit is contained in:
James D. Forrester 2016-04-01 14:29:06 +03:00
parent 1ad77ddf91
commit e9af948c3e

View file

@ -956,6 +956,7 @@ class VisualEditorHooks {
public static function onAuthPluginAutoCreate( $user ) {
if (
RequestContext::getMain()->getConfig()->get( 'VisualEditorAutoAccountEnable' ) &&
!User::getDefaultOption( 'visualeditor-editor' ) &&
$user->isLoggedin()
) {
$user->setOption( 'visualeditor-enable', 1 );