1
I’m using the following code:
foreach ($lista_grupos as $key => $value) {
if(strpos($lista_grupos[$key],'Tecnologia_da_Informacao')===true){
$admin = true;
}else{
$admin = false;
}
}
But it always returns false, it doesn’t find the string I want. What am I doing wrong? Follows array:
(array =>
[21] => CN=Tecnologia_da_Informacao,OU=Tecnologia_da_Informacao,OU=03-Operadora,DC=asdt,DC=com,DC=br
[22] => CN=asdasd,OU=02-Grupos,DC=uniiaca,DC=com,DC=br
[23] => CN=asdasd,OU=02-Grupos,DC=jçasdia,DC=com,DC=br
)
That looks like Idap to me.
– rray
It is, but I haven’t figured out how to get exactly the name of the group, this way is bringing the groups that the person participates in an array
– Rodrigo Segatto
You need to quit the loop when you find what you’re looking for, or you can change your variable to false in the next step.
– bfavaretto
I did the test, but does not enter the true if.
– Rodrigo Segatto
if(strpos($value, 'Tecnologia_da_Informacao') !== false)
– bfavaretto
I didn’t understand, why other than false?
– Rodrigo Segatto
Dude, slap that php code
– Wallace Maxters