Account create user cant add profile after add facebook login


#1

I have register with email and facebook.

on with email, using accounts-password

I add profile options, no profile added in Meteor.user()

this is code create user

Accounts.createUser(
            {
                username: 'admin',
                email: 'admin@somemail.com',
                password: 'admin123',
                profiles: {
                    fullname: 'Administrator'
                }
            });

server/main.js <-onCreate User

Accounts.onCreateUser(function (options, user) {

    if (!user.services.facebook) {
        return user;
    }
    user.username = user.services.facebook.name;
    user.emails = [{address: user.services.facebook.email}];

    console.log(options);
    if (options.profile) {
        user.profile = options.profile;
    }

    return user;
});

is there problem because I add facebook login too?

how to fix it so user can register with profile?


#2

Hi yozawiratama,

I was having the same problem with Github login. Did you find a solution to this problem?

thanks,
Oliver