Skip to content

Conversation

@LordSimal
Copy link
Contributor

If someone configures their instance to use a custom controller and table class like so in their config/users.php

'table' => 'AlfredStaffMembers.StaffMembers',
'controller' => 'AlfredStaffMembers.StaffMembers',

the mail for a one time login URL doesn't work since it was hardcoded to use the UsersController, therefore causing a Router exception.

Basically (as far as I can see) there should never be 'controller' => 'Users', anywhere in the src directory of this plugin, since all the Urls should be generated via the UsersUrl Utility to make sure it respects the users config.

Also latest cake requires rule names to be unique, therefore I just adjusted the already existing ones to make the CI green again.

$useTos = $options['use_tos'] ?? null;

$validator = $this->_table->validationDefault(new Validator());
$validator = $this->_table->validationRegister($validator);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This caused problems because the default validation rules would be loaded twice.

@LordSimal
Copy link
Contributor Author

@steinkel @ajibarra

@steinkel steinkel merged commit 1f17911 into CakeDC:15.next-cake5 Apr 8, 2025
13 checks passed
@steinkel
Copy link
Member

steinkel commented Apr 8, 2025

thank you @LordSimal !

@LordSimal
Copy link
Contributor Author

Any plans on doing a release for this? 😁

@steinkel
Copy link
Member

on it now :)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants