info@ektanjali.com +91 99276-99286

CakePHP 3.x User Management Premium Plugin Version 3.1.x

Plugin Bug Fixes & Migration

Version 3.1.0 Release Date: 22-Sep-2015

Bug Fixes and Improvement Table

From Version To Version Changes Date Links
3.1.0 3.1.1 16-Nov-2015  View
3.1.1 3.2.0 18-Oct-2016  View

 

 Plugin Version- 3.1.0 to 3.1.1

Date: 16-Nov-2015

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.1.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.1.1 version. You need to migrate user management plugin version from 3.1.0 to 3.1.1 in following steps...

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

Go to beforeFilter function

add
$this->controller->Auth->config('logoutRedirect', LOGOUT_REDIRECT_URL);

after $this->controller->Auth->config('loginRedirect', LOGIN_REDIRECT_URL);

2. Replace plugins\Usermgmt\src\Controller\Component\SearchComponent.php

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

Go to beforeFilter function

Add following code in this function in last

if(isset($this->Csrf) && $this->request->is('ajax') && $this->request['action'] == 'searchEmails') {
    $this->eventManager()->off($this->Csrf);
}

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

Go to logout function

Remove

$this->redirect(LOGOUT_REDIRECT_URL);

Go to deleteCache function

Replace $this->UserSettings->updateAll([$expression], ['name'=>'QRDN']);

with

$this->UserSettings->updateAll([$expression], ['name'=>'qrdn']);
$this->loadModel('Usermgmt.UserActivities');
$this->UserActivities->deleteAll(['1'=>'1']);

5. Open plugins\Usermgmt\src\Model\Table\UsermgmtAppTable.php

go to recaptchaValidate function and replace function code with

public function recaptchaValidate($value, $context) {
    require_once(USERMGMT_PATH.DS.'vendor'.DS.'recaptcha'.DS.'src'.DS.'autoload.php');
    $recaptcha = new \ReCaptcha\ReCaptcha(PRIVATE_KEY_FROM_RECAPTCHA);
    $resp = $recaptcha->verify($value);
    if($resp->isSuccess()) {
        return true;
    } else {
        $errors = $resp->getErrorCodes();
        return false;
    }
}

6. Open plugins\Usermgmt\src\Template\Element\search_form.ctp

Add

if($search_options['type'] == 'checkbox' && isset($search_options['checked'])) {
    unset($input_options['options']);
    $input_options['checked'] = $search_options['checked'];
}

after

if($search_options['type'] != 'text') {
    $input_options['options'] = $search_options['options'];
}

7. Open plugins\Usermgmt\webroot\css\umstyle.css

add following css

.usermgmtSearchForm .searchField .input.checkbox {
    margin: 0;
    width: 20px;
}
.usermgmtSearchForm .searchField .input.checkbox .form-control {
    display: inline-block;
    height: auto;
    margin: 0;
    position: relative;
    vertical-align: bottom;
    box-shadow: none;
}

8. Replace plugins\Usermgmt\webroot\js\ajaxValidation.js

Plugin Version- 3.1.1 to 3.2.0

Date: 18-Oct-2016

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.1.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 few changes in 3.2.0 version. You need to migrate user management plugin version from 3.1.1 to 3.2.0 in following steps...

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

Go to checkForCookieLogin function

Replace split with explode

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

Go to gmail_connect function

Replace require_once(USERMGMT_PATH.DS.'vendor'.DS.'google'.DS.'src'.DS.'Google'.DS.'autoload.php');

with require_once(USERMGMT_PATH.DS.'vendor'.DS.'google'.DS.'vendor'.DS.'autoload.php');

3. Open plugins\Usermgmt\src\Model\Table\UsersTable.php

Go to authsomeLogin function

Replace split with explode

Go to sendVerificationMail function

Add $link = '<a href="'.$link.'">'.$link.'</a>';
After $link = Router::url("/userVerification?ident=$userId&activate=$activate_key", true);

Go to sendForgotPasswordMail function

Add $link = '<a href="'.$link.'">'.$link.'</a>';
After $link = Router::url("/activatePassword?ident=$userId&activate=$activate_key", true);

4. Replace plugins\Usermgmt\src\Template\Element\paginator.ctp

5. Open plugins\Usermgmt\src\View\Helper\UserAuthHelper.php

Go to HP function

Replace $this->permissions = $this->view->requestAction('/usermgmt/UserGroupPermissions/getPermissions');

with $this->permissions = $this->view->requestAction(['controller' => 'UserGroupPermissions', 'action' => 'getPermissions', 'plugin'=>'Usermgmt']);

6. Replace plugins\Usermgmt\webroot\js\ajaxValidation.js

7. Go to plugins\Usermgmt\vendor

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