Skip to content

Switching to different Connections to perform ->attach() and ->detach() #351

Answered by stevebauman
nspaul asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @nspaul, this is a great question. I'll do my best to help you get this working.

So, is it possible to have a Laravel Command that starts by identifying the users using a bind account that has limited permissions, connecting on port 3269 (so that it can search the entire Global Catalog)

Unfortunately I've never worked with the global catalog before. I've only worked with a domain that had two child domains (a pretty simplistic setup), so I don't have much knowledge on this.

and then once I find the relevant users, then switch to using a different Connection in the users' domains for doing the $group->attach($user) part?

You can certainly do this now using the Model::on($connection)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@nspaul
Comment options

@stevebauman
Comment options

@stevebauman
Comment options

Answer selected by nspaul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants