Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 3353f29

Browse files
author
Ursula Clarke Everett
committed
Merge pull request #166 from CoderDojo/null-user-in-load-dojo-admins
Use args.user.id if no userId passed.
2 parents 457fc5a + b42d019 commit 3353f29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

users.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ module.exports = function (options) {
495495

496496
function cmd_load_dojo_admins_for_user (args, done) {
497497
var seneca = this;
498-
var userId = args.userId;
498+
var userId = args.userId || args.user ? args.user.id : null;
499499

500500
seneca.act({role: 'cd-dojos', cmd: 'dojos_for_user', id: userId}, function (err, dojos) {
501501
if (err) return done(err);

0 commit comments

Comments
 (0)