XF 1.3 secondary_group_ids

WSWD

Well-known member
Hello,

Just upgraded one of our forums to 1.3. Yeah, yeah...I know. :p

In any event. I have an external PHP script, and I use various items from the XenForo database to authenticate users on that page. One of them I use is the secondary_group_ids entries, to grant certain permissions (i.e. their forum permissions match what they can do on the external site). They used to be a nice comma-separated list, but now are just bizarre.

For example. I have a member whose secondary user groups are 3, 10, and 12. In the old version, the database would show 3,10,12. It was really easy to pull that from the database via a PHP file using CONCAT. Now it shows 332c31302c3132. No clue what any of that means, or what I'm supposed to do with it.

No idea when this changed, but it's the same way on all our 1.3 forums. Any help would be greatly appreciated!
 
Hmmmmm...used to be so simple. Thanks Matt!

Any easy way to use a WHERE statement with that? For example, I was using CONCAT to determine if "10" was in secondary_user_groups. On another page, I needed to see if "12" was in there. Was basically pulling somebody's information from the database based on upon their Secondary User Group membership.
 
Nothing changed in the data. What you're seeing is your DB viewer's (phpMyAdmin?) decided representation for that type of field. The data is still the same.

Ahhhhh, okay. So I can still use the same queries I'm guessing. Yes, I was using phpMyAdmin at the time.


Thanks!
 
Ahhhhh, okay. So I can still use the same queries I'm guessing. Yes, I was using phpMyAdmin at the time.


Thanks!
Correct: stats_type in xf_stats_daily is another varbinary column.

Code:
MariaDB [z22se_xenforo]> SELECT stats_type FROM xf_stats_daily LIMIT 10;
+-----------------------+
| stats_type            |
+-----------------------+
| attachment            |
| attachment_disk_usage |
| post                  |
| thread                |
| user_registration     |
| attachment            |
| attachment_disk_usage |
| post                  |
| thread                |
| user_registration     |
+-----------------------+
10 rows in set (0.00 sec)

MariaDB [z22se_xenforo]>
 
Back
Top Bottom