Array_Merge Error while making a group via MySQL
#1
Hi, I'm trying to make a plugin and the plugin makes a group via MySQL

error message
[Image: img_193212.png]

$db->write_query("INSERT INTO `" . TABLE_PREFIX . "usergroups` (`type`, `title`, `description`, `namestyle`, `usertitle`, `stars`, `starimage`, `image`, `disporder`, `isbannedgroup`, `canview`, `canviewthreads`, `canviewprofiles`, `candlattachments`, `canpostthreads`, `canpostreplys`, `canpostattachments`, `canratethreads`, `caneditposts`, `candeleteposts`, `candeletethreads`, `caneditattachments`, `canpostpolls`, `canvotepolls`, `canundovotes`, `canusepms`, `cansendpms`, `cantrackpms`, `candenypmreceipts`, `pmquota`, `maxpmrecipients`, `cansendemail`, `maxemails`, `canviewmemberlist`, `canviewcalendar`, `canaddevents`, `canbypasseventmod`, `canmoderateevents`, `canviewonline`, `canviewwolinvis`, `canviewonlineips`, `cancp`, `issupermod`, `cansearch`, `canusercp`, `canuploadavatars`, `canratemembers`, `canchangename`, `showforumteam`, `usereputationsystem`, `cangivereputations`, `reputationpower`, `maxreputationsday`, `maxreputationsperuser`, `maxreputationsperthread`, `candisplaygroup`, `attachquota`, `cancustomtitle`, `canwarnusers`, `canreceivewarnings`, `maxwarningsday`, `canmodcp`, `showinbirthdaylist`, `canoverridepm`, `canusesig`, `canusesigxposts`, `signofollow`) VALUES
		(1, 'Custom rank', 'Title', '<span style=\"color:#06a478;\">{username}</span>', 'Custom user', 0, 'images/star.gif', '', 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 200, 5, 1, 5, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 5, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0);");

This is the one that is making the custom rank

Is there another field that I need to configure to do this?
Reply
#2
Are you sure that's the code that is causing the error? I just ran the same code and it worked.
Reply
#3
really? Then I have no idea what might be causing the problem. It really looks like something from the permissions... did you try moving someone to that group? and make sure you did not press save via admin cp on the group
I found a fix.
I added
	$cache->update_usergroups();
	$cache->update_forumpermissions();
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)