Skip to content

Commit 2781d65

Browse files
prakhar1989bojeil-google
authored andcommitted
added lookup in config for display name change
1 parent c29000e commit 2781d65

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

javascript/widgets/handler/passwordsignup.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,22 @@ firebaseui.auth.widget.handler.handlePasswordSignUp = function(
7070
* @private
7171
*/
7272
firebaseui.auth.widget.handler.onSignUpSubmit_ = function(app, component) {
73+
var shouldDisplayName = app.getConfig().getShouldDisplayName();
74+
7375
// Check fields are valid.
7476
var email = component.checkAndGetEmail();
75-
var name = component.checkAndGetName();
77+
78+
var name = null;
79+
if (shouldDisplayName) {
80+
name = component.checkAndGetName();
81+
}
82+
7683
var password = component.checkAndGetNewPassword();
7784
if (!email) {
7885
component.getEmailElement().focus();
7986
return;
8087
}
81-
if (!name) {
88+
if (shouldDisplayName && !name) {
8289
component.getNameElement().focus();
8390
return;
8491
}

0 commit comments

Comments
 (0)