Plugin Bug Fixes & Migration

Plugin First Release Date: 1-Apr-2015

Bug Fixes and Improvement Table

From Version To Version Changes Date Links
3.3.0 3.3.1 15-Nov-2018

 View

3.3.1 3.3.2 17-Dec-2018

View

 

 Plugin Version- 3.3.0 to 3.3.1

Date: 15-Nov-2018

Please keep backup of your code before replacing the files. Either you can replace existing files or do changes in existing code as per new changes.

You can download the old version 3.3.0 and make a difference with your application code using Kdiff3 software http://kdiff3.sourceforge.net/ and record your changes done in plugin files.

we have done few changes in 3.3.1 version. You need to migrate user management plugin version from 3.3.0 to 3.3.1 in following steps...

1. Open plugins\Usermgmt\src\Controller\ScheduledEmailsController.php

Go to beforeFilter function

Delete following code

if(isset($this->Csrf) && $this->getRequest()->is('ajax') && $this->getRequest()->getParam('action') == 'deleteRecipient') {
    $this->getEventManager()->off($this->Csrf);
}

2. Open plugins\Usermgmt\src\Controller\UserEmailsController.php

Go to beforeFilter function

Delete following code

if(isset($this->Csrf) && $this->getRequest()->is('ajax') && $this->getRequest()->getParam('action') == 'searchEmails') {
    $this->getEventManager()->off($this->Csrf);
}

3. Open plugins\Usermgmt\src\Controller\UserGroupPermissionsController.php

Go to beforeFilter function

Delete following code

if(isset($this->Csrf)) {
    $this->getEventManager()->off($this->Csrf);
}

4. Open plugins\Usermgmt\src\Controller\UsermgmtAppController.php

Go to initialize function

Delete following code

$this->loadComponent('Csrf');

5. Open plugins\Usermgmt\src\Controller\Component\UserAuthComponent.php

Go to isAllowedLogin function

Replace following code

if(!empty($res)) {
    return false;
} else {
    $activityModel->updateAll(['logout'=>1], ['user_id'=>$userId, 'useragent !='=>$useragent]);
}

with following code

if(!empty($res)) {
    if($res['logout'] || $res['deleted']) {
        return true;
    }
    return false;
} else {
    $activityModel->updateAll(['logout'=>1], ['user_id'=>$userId, 'useragent !='=>$useragent]);
}

 

6. Open plugins\Usermgmt\src\Model\Behavior\SearchingBehavior.php

Go to setSearchValues function

Replace following code

$this->searchValues[$this->alias] = array_merge($this->searchValues[$this->alias], $values);

with following code

if(is_array($values)) {
    $this->searchValues[$this->alias] = array_merge($this->searchValues[$this->alias], $values);
}

7. Replace plugins\Usermgmt\src\View\Cell\PermissionCell.php from latest plugin

8. Go to plugins\Usermgmt\vendor

Replace Facebook, Google, recaptcha, vendor files with latest version files

 

 Plugin Version- 3.3.1 to 3.3.2

Date: 17-Dec-2018

Please keep backup of your code before replacing the files. Either you can replace existing files or do changes in existing code as per new changes.

You can download the old version 3.3.1 and make a difference with your application code using Kdiff3 software http://kdiff3.sourceforge.net/ and record your changes done in plugin files.

we have done only 1 change in 3.3.2 version. You need to migrate user management plugin version from 3.3.1 to 3.3.2 in following steps..

 

Open plugins\Usermgmt\src\Controller\Component\UserConnectComponent.php

Go to gmail_connect function

Replace following code

$client->setScopes(array('https://www.googleapis.com/auth/userinfo.email'));

with following code

$client->setScopes(array('email'));
$client->setPrompt('select_account');