[XenConcept] Login As User

[XenConcept] Login As User [Paid] 2.1.0 Patch 2

No permission to buy ($15.00)

MattW

Well-known member
@MattW

I have this installed on otra.org.uk on your server and don't get that error ever.

just mentioning in case it has any relevance!
This is installed on one of my US servers, and this site is running PHP 7.4. What PHP version is otra using?
 

MattW

Well-known member
Swapped the site back down to PHP7.3, and the error doesn't occur, so it's something with this addon and PHP7.4.
 

Mr Lucky

Well-known member
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) {
  }
}
 

Robert9

Well-known member
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.png
Because of this i avoid groups with more than two parts now. Just as an idea for you.
 

Robert9

Well-known member
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.
 

XenConcept

Well-known member
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.png
    Screenshot_1.png
    3.7 KB · Views: 3
  • Screenshot_2.png
    Screenshot_2.png
    12.2 KB · Views: 3

Ozzy47

Well-known member
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
 
Top