Przeglądaj źródła

Added default rank to account profile upon creation.

KrisVos130 9 lat temu
rodzic
commit
afae87d1cb
1 zmienionych plików z 8 dodań i 1 usunięć
  1. 8 1
      app/app.js

+ 8 - 1
app/app.js

@@ -617,7 +617,14 @@ if (Meteor.isServer) {
         }
     });
 
-
+    Accounts.onCreateUser(function(options, user) {
+        console.log(options, user);
+        if (options.profile) {
+            user.profile = options.profile;
+            user.profile.rank = "default";
+        }
+        return user;
+    });
 
     ServiceConfiguration.configurations.remove({
         service: "facebook"