Added default avatar and banner to createProfile, and small bug
This commit is contained in:
parent
4d684a7271
commit
7735b6cfdb
@ -85,7 +85,7 @@ Meteor.publish('work', function() {
|
|||||||
return work.find({
|
return work.find({
|
||||||
// Only return work of enrolled classes
|
// Only return work of enrolled classes
|
||||||
class: {
|
class: {
|
||||||
$in: userprofile.profile.classes.concat(Meteor.userId())
|
$in: userprofile.profile.classes.concat(this.userId)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -484,6 +484,8 @@ Meteor.methods({
|
|||||||
var current = Meteor.users.findOne({
|
var current = Meteor.users.findOne({
|
||||||
_id: userId
|
_id: userId
|
||||||
}).profile;
|
}).profile;
|
||||||
|
current.banner = "/Banners/defaultcover.jpg";
|
||||||
|
current.avatar = "/Avatars/" + (Math.floor(Math.random() * 10) + 1).toString() + ".png";
|
||||||
current.classes = [];
|
current.classes = [];
|
||||||
current.preferences = {
|
current.preferences = {
|
||||||
"theme": "light",
|
"theme": "light",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user