From 0e8a69015a61bbbdb682a8d9a60b9d4a307cbad5 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Thu, 7 Aug 2014 21:45:18 -0700 Subject: [PATCH] Fix reference to app See https://github.com/strongloop/loopback/issues/452 --- lib/models/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/models/user.js b/lib/models/user.js index 09e3281a..c43d557f 100644 --- a/lib/models/user.js +++ b/lib/models/user.js @@ -289,7 +289,7 @@ User.prototype.verify = function (options, fn) { options.user = this; options.protocol = options.protocol || 'http'; - var app = this.app; + var app = userModel.app; options.host = options.host || (app && app.get('host')) || 'localhost'; options.port = options.port || (app && app.get('port')) || 3000; options.restApiRoot = options.restApiRoot || (app && app.get('restApiRoot')) || '/api';