Welcome Guest, Not a member yet? Register   Sign In
ion_auth Groups issue
#4

[eluser]The Revel[/eluser]
[quote author="Aken" date="1337925027"]Creating the drop down is correct. What does $groups look like after you retrieve it?[/quote]

Its an array, when I echo groups it simply says array, so its getting information assigned to it, just not the right info. I have a feeling I have to some how extract the groups[] array somehow but unfortunately I am not sure which way to go on that. I am assuming something along the lines of groups[$i] method.

Something along the lines of

Code:
$group = array($this->input->post('groups[0]'));
if (isset($this->input->post('groups[1]')))
{
array_push($group, $this->input->post('groups[1]'));
}
if (isset($this->input->post('groups[2]')))
{
array_push($group, $this->input->post('groups[2]'));
}

I have not tested this of course, will try it now and see if I am right.


[EDIT]

Well, that didn't work, neither did
Code:
$groups = array($this->input->post('groups[0]'));
            if ($this->input->post('groups[1]'))
            {
                array_push($groups, $this->input->post('groups[1]'));
            }
            if ($this->input->post('groups[2]'))
            {
            array_push($groups, $this->input->post('groups[2]'));
            }
(which I changed to since the first method is not possible as my IDE tells me it cant use a method return value)

Anyone have any idea how to make this work? I want the super admins to be able to create users with Multiple groups. Alternately I could use check boxes I guess, but fear I would run into the same problem.

[/EDIT]


Messages In This Thread
ion_auth Groups issue - by El Forum - 05-24-2012, 07:45 PM
ion_auth Groups issue - by El Forum - 05-24-2012, 08:50 PM
ion_auth Groups issue - by El Forum - 05-24-2012, 10:50 PM
ion_auth Groups issue - by El Forum - 05-25-2012, 08:04 AM
ion_auth Groups issue - by El Forum - 05-25-2012, 08:40 AM
ion_auth Groups issue - by El Forum - 05-25-2012, 09:05 AM
ion_auth Groups issue - by El Forum - 05-25-2012, 09:20 AM
ion_auth Groups issue - by El Forum - 05-25-2012, 09:24 AM
ion_auth Groups issue - by El Forum - 05-25-2012, 09:34 AM
ion_auth Groups issue - by El Forum - 05-25-2012, 09:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB