User Profile

Collapse

Profile Sidebar

Collapse
tasha whitman
tasha whitman
Last Activity: May 9 '11, 08:52 PM
Joined: May 6 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Okay I figured it out. It was a mixture of discovery and newbie error.

    Code:
    $roleout = $this->userInfo['_group'];
    			$role2 = unserialize($roleout);
    			
    			
    			$userIsAdmin = false;
    			$userPerms = array(
    				"role" => $role3 = ($role2[0]), //role id
    and that was it. I was putting the second part in {} which was messing it all up. And then I needed to learn more...
    See more | Go to post

    Leave a comment:


  • Thank you. That doesn't seem to work for me though. I should probably give more info. The SQL database I am pulling out of is labeled

    _group
    with
    Code:
    a:1:{i:0;s:1:"4";}
    in it

    On the php end where i am trying to get that number into looks like this
    Code:
    $userPerms = array(
         "role" => "", //role id
    When I stick the number "4" in there it works!...
    See more | Go to post

    Leave a comment:


  • How can I pull a specific part out of a serialized data?

    I'm new to PHP and I've been trying to wrap my brain around this to no avail. Basically in this program I have groups and the group id is apparently stored as serialized data like this:

    Code:
    a:1:{i:0;s:2:"4";}
    The only number i need is "4".

    But I have no idea how to pull that out. IS this easier than it feels?

    Thank you!
    See more | Go to post
No activity results to display
Show More
Working...