Comments (7)
Could you please properly report how to reproduce the issue and post the whole stack trace from the error? Also what branch or version are you using?
from cakephp-user-tools.
I resolved the problem as the following:
public function register($options = []) {
$options = Hash::merge($this->_config['registration'], $options);
if ($options['enabled'] === false) {
throw new NotFoundException();
}
$entity = $this->UserTable->newEntity();
$return = false; // make return as a variable
// Make the field accessible in the case the default entity class is used.
$entity->accessible('confirm_password', true);
if ($this->request->is('post')) {
$entity = $this->UserTable->patchEntity($entity, $this->request->data());
if ($this->UserTable->register($entity)) {
$this->handleFlashAndRedirect('success', $options);
if ($options['setEntity'] === true) {
$this->_controller->set('usersEntity', $entity);
}
$return = true; //dont return here, just set the value to true
} else {
$this->handleFlashAndRedirect('error', $options);
if ($options['setEntity'] === true) {
$this->_controller->set('usersEntity', $entity);
}
}
}
//this line will executed in all cases, no return before.
if ($options['setEntity'] === true) {
$this->_controller->set('userEntity', $entity);
// BC
$this->_controller->set('usersEntity', $entity);
}
//the return comes here
return $return;
}
I hope the issue is clear now, and sorry if my English is not very well :)
from cakephp-user-tools.
Can you please show the change as diff or create a pull request?
There is no "userData" at all in the component by the way.
from cakephp-user-tools.
Fixed in the develop branch.
from cakephp-user-tools.
thanks
from cakephp-user-tools.
Sorry for my out of box question, but how can I use the develop branch?
I tried several times but didn't succeed
from cakephp-user-tools.
I urgently recommend you to read the composer manual. https://getcomposer.org/doc/ Composer is a common tool these days and Cake and almost all plugins and other popular php scripts use it.
composer require burzum/cakephp-user-tools dev-develop
But I've merged it into master as well and tagged 1.0.1 too.
from cakephp-user-tools.
Related Issues (20)
- Issues encountered during setup HOT 4
- Validation issue in request_password HOT 1
- Setup Help HOT 5
- when request password: (The email is already in use) HOT 1
- Something wrong in quick start tutorial? HOT 5
- won't update last activity HOT 3
- Does this plugin support multiple user roles? HOT 1
- Error: Call to a member function user() on boolean HOT 4
- actionMap error HOT 13
- Advice on configuration HOT 2
- Weird redirects HOT 6
- Using controller instead of component HOT 5
- debugKit conflict HOT 4
- how to catch events? HOT 1
- getParam used in UserToolComponent.php HOT 3
- User tools behaviour config email HOT 1
- question about prefix routing HOT 2
- Login not possible after register HOT 1
- Not sending emails HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cakephp-user-tools.