Open madebysimone opened 8 years ago
Ho simonepolidori, you can edit app/Controller/AppController.php and add loginRedirect
to the $components['Auth']
array, like this:
public $components = array(
[...]
'Auth' => array(
'authenticate' => array(
'Form' => array(
'passwordHasher' => 'Blowfish',
'fields' => array('username' => 'email')
)
),
'authorize' => array('Controller'),
'unauthorizedRedirect' => array('controller' => 'songs', 'action' => 'index'),
'loginRedirect' => array('controller' => 'songs', 'action' => 'albums')
),
[...]
);
But you will need to do this each time you update Sonerezh...
I made the adjustment but it does not seem to work even after rebooting the whole server.
I made albums default page with the following:
--- UsersController.php.OLD 2017-07-27 11:41:16.969862000 +0200
+++ UsersController.php 2017-07-27 11:41:56.086034000 +0200
@@ -150,7 +150,7 @@
$this->Session->delete('auth');
}
- return $this->redirect($this->Auth->redirectUrl());
+ return $this->redirect($this->Auth->redirectUrl('https://sonerezh.example.org/albums'));
} else {
$this->Flash->error(__('Wrong credentials!'));
However, I have no idea if I broke anything else, hopefully someone reviews this :)
Hi I was wondering how I could setup my installation of Sonerezh so that the default web page loaded is not "songs" but "albums"? Thanks!