1) Open the file /libraries/cms/application/cms.php
2) Search function login($credentials, $options = array())
3) Search lines (819 - 826):
$authorisations = $authenticate->authorise($response, $options);
foreach ($authorisations as $authorisation)
{
$denied_states = array(JAuthentication::STATUS_EXPIRED, JAuthentication::STATUS_DENIED);
if (in_array($authorisation->status, $denied_states))
{
IMHO that will be better this way:
$authorisations = $authenticate->authorise($response, $options);
$denied_states = JAuthentication::STATUS_EXPIRED | JAuthentication::STATUS_DENIED;
foreach ($authorisations as $authorisation)
{
if ((int) $authorisation->status & $denied_states)
{
Joomla! 3.6.2
1) Bitwise operations more effective than array(...) and in_array().
2) $denied_states = array(...)
is inside of the cycle, but value of $denied_states is invariable, so will be better to move the initialisation of it before of the cycle.
Labels |
Added:
?
|
Status | New | ⇒ | Information Required |
Category | ⇒ | Libraries |
Thanks
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-08-18 09:16:44 |
Closed_By | ⇒ | zero-24 |
Set to "closed" on behalf of @zero-24 by The JTracker Application at issues.joomla.org/joomla-cms/11643
Closing as we have a pull request #11655
Can you send your code change as pull request? That makes testing much more easy. If you need help please have a look here: https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11643.