Fix oauth name autofill for registration
This commit is contained in:
parent
541789ae27
commit
f9059161ec
|
@ -309,8 +309,8 @@ class OAuthController extends BaseController
|
||||||
|
|
||||||
$this->session->set('form-data-username', $userdata->get($config['username']));
|
$this->session->set('form-data-username', $userdata->get($config['username']));
|
||||||
$this->session->set('form-data-email', $userdata->get($config['email']));
|
$this->session->set('form-data-email', $userdata->get($config['email']));
|
||||||
$this->session->set('form-data-first_name', $userdata->get($config['first_name']));
|
$this->session->set('form-data-firstname', $userdata->get($config['first_name']));
|
||||||
$this->session->set('form-data-last_name', $userdata->get($config['last_name']));
|
$this->session->set('form-data-lastname', $userdata->get($config['last_name']));
|
||||||
|
|
||||||
$this->session->set('oauth2_groups', $userdata->get($config['groups'], []));
|
$this->session->set('oauth2_groups', $userdata->get($config['groups'], []));
|
||||||
$this->session->set('oauth2_connect_provider', $providerName);
|
$this->session->set('oauth2_connect_provider', $providerName);
|
||||||
|
|
|
@ -461,8 +461,8 @@ class OAuthControllerTest extends TestCase
|
||||||
$this->assertEquals(null, $this->session->get('oauth2_allow_registration'));
|
$this->assertEquals(null, $this->session->get('oauth2_allow_registration'));
|
||||||
$this->assertEquals($this->session->get('form-data-username'), 'username');
|
$this->assertEquals($this->session->get('form-data-username'), 'username');
|
||||||
$this->assertEquals($this->session->get('form-data-email'), 'foo.bar@localhost');
|
$this->assertEquals($this->session->get('form-data-email'), 'foo.bar@localhost');
|
||||||
$this->assertEquals($this->session->get('form-data-first_name'), 'Foo');
|
$this->assertEquals($this->session->get('form-data-firstname'), 'Foo');
|
||||||
$this->assertEquals($this->session->get('form-data-last_name'), 'Bar');
|
$this->assertEquals($this->session->get('form-data-lastname'), 'Bar');
|
||||||
|
|
||||||
$this->config->set('registration_enabled', false);
|
$this->config->set('registration_enabled', false);
|
||||||
$this->expectException(HttpNotFound::class);
|
$this->expectException(HttpNotFound::class);
|
||||||
|
@ -541,8 +541,8 @@ class OAuthControllerTest extends TestCase
|
||||||
$controller->index($request);
|
$controller->index($request);
|
||||||
$this->assertEquals($this->session->get('form-data-username'), 'testuser');
|
$this->assertEquals($this->session->get('form-data-username'), 'testuser');
|
||||||
$this->assertEquals($this->session->get('form-data-email'), 'foo.bar@localhost');
|
$this->assertEquals($this->session->get('form-data-email'), 'foo.bar@localhost');
|
||||||
$this->assertEquals($this->session->get('form-data-first_name'), 'Test');
|
$this->assertEquals($this->session->get('form-data-firstname'), 'Test');
|
||||||
$this->assertEquals($this->session->get('form-data-last_name'), 'Tester');
|
$this->assertEquals($this->session->get('form-data-lastname'), 'Tester');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue