Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit bb8fb3f

Browse files
committed
Remove noLogin option from $createUser, fixes #235
1 parent c9de214 commit bb8fb3f

File tree

3 files changed

+20
-37
lines changed

3 files changed

+20
-37
lines changed

angularfire.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -803,9 +803,10 @@
803803

804804
// Creates a user for Firebase Simple Login. Function 'cb' receives an
805805
// error as the first argument and a Simple Login user object as the second
806-
// argument. Set the optional 'noLogin' argument to true if you don't want
807-
// the newly created user to also be logged in.
808-
createUser: function(email, password, noLogin) {
806+
// argument. Note that this function only creates the user, if you wish to
807+
// log in as the newly created user, call $login() after the promise for
808+
// this method has been fulfilled.
809+
createUser: function(email, password) {
809810
var self = this;
810811
var deferred = this._q.defer();
811812

@@ -814,15 +815,7 @@
814815
self._rootScope.$broadcast("$firebaseSimpleLogin:error", err);
815816
deferred.reject(err);
816817
} else {
817-
if (!noLogin) {
818-
// Resolve the promise with a new promise for login.
819-
deferred.resolve(self.login("password", {
820-
email: email,
821-
password: password
822-
}));
823-
} else {
824-
deferred.resolve(user);
825-
}
818+
deferred.resolve(user);
826819
}
827820
});
828821

angularfire.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)