silence
Well-known member
Alright so I'm extending XenForo_ControllerAdmin_User and my _getUserAddEditReponse function looks like so:
The template code looks like this:
However when I type something into the text field, it gives me this error:
What is causing this, I can't seem to figure it out
Code:
protected function _getUserAddEditResponse(array $user)
{
$response = parent::_getUserAddEditResponse($user);
if (XenForo_Visitor::getInstance()->hasAdminPermission('viewTeamspeakCP'))
{
$response->params['teamspeak']['identities'] = $this->_getAccountModel()->getAuthId($user['user_id']);
$response->params['teamspeak']['servergroups'] = $this->_getGroupsModel()->getGroupListByAccessType('userid', $user['user_id']);
}
return $response;
}
Code:
<fieldset>
<xen:if is="!{$teamspeak.identities}">
<dl class="ctrlUnit inputBox">
<dt><label for="ctrl_auth_id">{xen:phrase teamspeak_change_identity}</label></dt>
<dd><input type="text" name="auth_id[]" value="{xen:phrase teamspeak_none}" id="ctrl_auth_id" class="textCtrl" /></dd>
</dl>
<xen:else />
<xen:foreach loop="$teamspeak.identities" value="$value" i="$i">
<dl class="ctrlUnit inputBox">
<dt><label for="ctrl_auth_id">{xen:phrase teamspeak_change_identity} #{$i}</label></dt>
<dd><input type="text" name="auth_id[]" value="{$value}" id="ctrl_auth_id" class="textCtrl" /></dd>
</dl>
</xen:foreach>
<input type="button" value="{xen:phrase teamspeak_add_identity}" class="button smallButton FieldAdder JsOnly" data-source="dl.inputBox"/>
</xen:if>
</fieldset>
However when I type something into the text field, it gives me this error:
What is causing this, I can't seem to figure it out