[XenConcept] Login As User

[XenConcept] Login As User [Paid] 2.2.0

No permission to buy ($15.00)
However I can confirm same error also when I switch the otra forum to 7.4

Code:
    ErrorException: [E_NOTICE] Trying to access array offset on value of type int src/addons/XenConcept/LoginAsUser/XF/Pub/Controller/Misc.php:136

    Generated by: Pete Thomas Jun 28, 2020 at 12:13 PM

Stack trace

#0 src/addons/XenConcept/LoginAsUser/XF/Pub/Controller/Misc.php(136): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/home/otra/publ...', 136, Array)
#1 src/XF/Mvc/Dispatcher.php(350): XenConcept\LoginAsUser\XF\Pub\Controller\Misc->actionLoginAsUser(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Misc', 'LoginAsUser', Object(XF\Mvc\RouteMatch), Object(XenConcept\LoginAsUser\XF\Pub\Controller\Misc), NULL)
#3 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XenConcept\LoginAsUser\XF\Pub\Controller\Misc), NULL)
#4 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2190): XF\Mvc\Dispatcher->run()
#6 src/XF.php(391): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}

Request state

array(4) {
  ["url"] => string(149) "/community/misc/login-as-user?_xfRequestUri=%2Fcommunity%2F&_xfWithData=1&_xfToken=1593342836%2Cdc233e5a4da962d75ae9e724aabaac52&_xfResponseType=json"
  ["referrer"] => string(30) "https://otra.org.uk/community/"
  ["_GET"] => array(4) {
    ["_xfRequestUri"] => string(11) "/community/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(43) "1593342836,dc233e5a4da962d75ae9e724aabaac52"
    ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}
 
You may want to move the button alone at the end, because now you make the group long!
follow|ignore|login
and that looks ugly on small screens.

pixel4.webp
Because of this i avoid groups with more than two parts now. Just as an idea for you.
 
Code:
  <modification type="public" template="member_macros" modification_key="xc_login_as_user_member_macros" description="Add template for link &quot;Login as user&quot;" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[<!--[XF:action_groups:end]-->]]></find>
    <replace><![CDATA[$0
<xf:if is="!$xf.options.xc_login_as_user_no_display_tabs">
    <xf:include template="xc_login_as_user_member_macros" />
</xf:if>
]]></replace>
  </modification>

Not testet, but should fit.
 
Code:
  <modification type="public" template="member_macros" modification_key="xc_login_as_user_member_macros" description="Add template for link &quot;Login as user&quot;" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[<!--[XF:action_groups:end]-->]]></find>
    <replace><![CDATA[$0
<xf:if is="!$xf.options.xc_login_as_user_no_display_tabs">
    <xf:include template="xc_login_as_user_member_macros" />
</xf:if>
]]></replace>
  </modification>

Not testet, but should fit.

Good evening,

In activating the development mode. You can modify the template modification "Login as user: member_macros" and change the value of 'find' to <!--[XF:action_groups:end]-->
 

Attachments

  • Screenshot_1.webp
    Screenshot_1.webp
    2.6 KB · Views: 3
  • Screenshot_2.webp
    Screenshot_2.webp
    12.4 KB · Views: 3
On a site I am staff on, this has been popping up at the top of pages occasionally.

Code:
Deprecated
: Required parameter $userLimit follows optional parameter $forceIncludeVisitor in
/home/SITE/src/addons/XenConcept/LoginAsUser/XF/Repository/SessionActivity.php
on line
16

No errors reported in the error log. Running PHP 8.x
 
Back
Top Bottom