Hi, i have downloaded the Users plugin from CakeDC and is working fine but the problem is how do i design the form? i mean add my styles? and also how do i set the form action url? i have have tried <?= $this->Form->create(['url' => ['controller' => '', 'action' => 'profile]]) ?>
But i was meet with this error
Unable to find table class for current entity.
RuntimeException
i want to redirect to the profile page after login
and also how to setup the smtp to that emails can be sent to newly registered user, lost password request and others.
Please help.
That link I sent you in an earlier question has a whole section on Overriding Plugin Templates from Inside Your Application. And the CakeDC users plugin documentation has a whole section on âcustomize my login page toâŚâ which answers this even more directly.
You almost certainly donât want to âset the form action URLâ, that needs to go to the login page. What it seems you want is to change the URL it redirects to after a successful login, which is also addressed in that CakeDC documentation.
And as for configuring how emails are sent, thatâs nothing to do with the users plugin, itâs just going to use whatever youâve got for your email configuration.
2 Likes
Thanks a lot for your help, but there is this one thing that i wnt to understand you see tlking about CakePhp plugins i wnt to have some of my plugings at the plugins folder at my root so that i can ogarnise my site like i said in my first post, but looking at CakeDC Users plugin if i download it straight away from github it diferent from downloading it from composer so i want to know if there is a work around for this i mean if ican have the whole plugin in the plugins folder without going to vendor/cakedc/users/users/ to do some modifictions and also been able to host the plugin in the plugins folder will let me seprate the users like some module like i said in my first post. thanks
You shouldnât be downloading any third-party plugin straight from github, you should definitely use composer for that, and donât ever make changes in their code. It will make updating when they have new features or bugfixes far easier.
And before you say that you need to modify the template in their folder, no you donât. Iâve given you links that document where exactly to put a file in your own folder structure so that it is used instead of the default one from their plugin.
1 Like
You can change loginredirect in users.php config file, which you need to copy to your config folder then make changes to it
âAuthenticationComponentâ => [
âloadâ => true,
âloginRedirectâ => â/xxxxxxxxxxxxâ,
ârequireIdentityâ => false,
],
smtp you need to setup in app.php config file
I think sometimes is ok to put it in plugins folder, then you can easily change any code inside you want but you can not update it then when use composer. Which can lead to problem when you want to update cakephp version and things like that.
When you use composer, you will be looking to extend the plugin, so you can overwrite the code that is in vendor folder without actually changing anything inside vendor folder⌠If that makes senseâŚ