Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't add a member to board #43

Open
Phantomea opened this issue Nov 12, 2016 · 1 comment
Open

Can't add a member to board #43

Phantomea opened this issue Nov 12, 2016 · 1 comment
Labels
question Information on how to use the library
Milestone

Comments

@Phantomea
Copy link

Phantomea commented Nov 12, 2016

Hello I have and issue with adding new member to board.

I can get board which I want, can use i.e. ->setLabelNames() but can't use setMemberships();

Is this function "that" function what I need to add new member to the board?

I used exactly this code
$currentBoard->setMemberships([ 'idMembership' => 'id of member', 'type' => 'normal' ])->save();

Please help me :( I really need it to finish my work.

@Phantomea
Copy link
Author

Oukey, I'm gonna answer myself, hope someone will need to use this and it will be useful.

This is how I did it:

  1. I get all my boards. $boards = $client->members()->boards()->all('me');
  2. By foreach loop I found the board I wanted foreach($boards as $board)
  3. Then I invited a user by his trello email: $client->boards()->members()->invite($board['id'], 'email of trello user', 'Full name of the person');

@augustohp augustohp added the question Information on how to use the library label Dec 21, 2016
@augustohp augustohp added this to the 1.0 milestone Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Information on how to use the library
Projects
None yet
Development

No branches or pull requests

2 participants