Skip to content

Instantly share code, notes, and snippets.

@sohelrana820
Last active June 3, 2017 09:05
Show Gist options
  • Save sohelrana820/58402f2fb6c36cc5cd7d049c1fb63360 to your computer and use it in GitHub Desktop.
Save sohelrana820/58402f2fb6c36cc5cd7d049c1fb63360 to your computer and use it in GitHub Desktop.
<?php
// Open PROJECT_ROOT/src/Controller/AppController.php file and go to line no 123 (approximate line or find $this->Auth->allow)
// And then replace this snippet with below snippet.
$this->Auth->allow([
'signup',
'verifyEmail',
'forgotPassword',
'install',
'resetPassword',
'requirements',
'database',
'general',
'administrator',
'emailConfig'
]);
$this->Auth->allow([
'signup',
'verifyEmail',
'forgotPassword',
'resetPassword',
]);
?>
<?php
// Open PROJECT_ROOT/src/Controller/InstallationController.php file and go to line no 47. ((approximate line)
// And then add this code inside beforeFilter() function.
$this->Auth->allow([
'install',
'requirements',
'database',
'general',
'administrator',
'emailConfig'
]);
// Finally beforeFilter() will look like.
public function beforeFilter(Event $event)
{
$this->Auth->allow([
'requirements',
'database',
'general',
'administrator',
'emailConfig'
]);
parent::beforeFilter($event);
$this->viewBuilder()
->layout('installation')
->theme($this->currentTheme);
if (file_exists(ROOT . '/Conf/config.ini')) {
$iniData = parse_ini_file(ROOT . '/Conf/config.ini');
if (isset($iniData['INSTALLATION_RESULT']) && $iniData['INSTALLATION_RESULT']) {
$this->redirect($this->referer());
}
}
}
?>
@3588
Copy link

3588 commented Jun 3, 2017

Hi

use

 $this->Auth->allow([
        'signup',
        'verifyEmail',
        'forgotPassword',
        'resetPassword',
    ]);

to replace or add after line 130 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment