Skip to content

Commit 3eaafe4

Browse files
authored
Merge pull request jaredhanson#491 from murashki/master
session.js code cosmetics
2 parents ad5fe1d + 63a267e commit 3eaafe4

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

lib/strategies/session.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,10 @@ SessionStrategy.prototype.authenticate = function(req, options) {
5454
if (err) { return self.error(err); }
5555
if (!user) {
5656
delete req._passport.session.user;
57-
self.pass();
58-
if (paused) {
59-
paused.resume();
60-
}
61-
return;
57+
} else {
58+
var property = req._passport.instance._userProperty || 'user';
59+
req[property] = user;
6260
}
63-
var property = req._passport.instance._userProperty || 'user';
64-
req[property] = user;
6561
self.pass();
6662
if (paused) {
6763
paused.resume();

0 commit comments

Comments
 (0)