Skip to content

meldDBCallback confussion #39

@ghost

Description

This is a great and comprehensive package - thanks for all your work.

I have an issue in my application where members may belong to various groups. If someone has signed up with a service (like Facebook) and joins a group, their user_id is used as their memberId in the Members collection. Then if the same person registers (new registration) with their email address with a verification email, the accounts-meld works great - but I want to be able to change their memberId in the Members collection using the MeldDBCallback function, and I can't seem to get it to work (the Members.update doesn't happen).

I followed the documentation as follows:
var meldDBCallback = function(src_user_id, dst_user_id){
Members.update(
{MemberId: src_user_id},
{$set: {MemberId: dst_user_id}},
{multi: true}
);
};

AccountsMeld.configure({
meldDBCallback: meldDBCallback
});

What am I missing? Any help would be greatly appreciated - thanks, Bob

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions