![]() |
removing specific data from membergroupids
I've got a plugin that extends many of the VB permissions out to an external datasource.
One of the things I am trying to do is make updates to the membergroupids column of the user table based on logic in my plugin. I'm unsure how exactly to read the contents of membergroupids for a user and strip out only a single id number without changing the rest. So for example is user A has membergroupids set to 9,10, 11 and my plugin determines that this user should no longer have access to 10, I want to update that value to be 9,11. Does anyone have some insight on an easy method to accomplish this? Thanks! Bobbo :rolleyes: |
Anyone have some thoughts on this one?
I think what I am trying to do is update the array, but if I try to unset one of the values using a foreach statement it doesnt work. I suspect someone with more php knowledge than myself would know how to do this. I'd really appreciate any help. Thanks. B |
Ok, I think I got this one licked...
I can tell the interest level by the high level of responses... lol. ;-) Anyhow, I'm doing something like this. Code:
eval('$getids = array ('.$vbulletin->userinfo['membergroupids'].');'); Seems to work really well. Not sure if there are any 'gotchas' or reasons why this would be a problem. If anyone has any feedback, I'd apprecaite it. Maybe it will help someone else... Bobbo |
All times are GMT. The time now is 01:40 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|