Closed tsarma closed 9 years ago
The email field is mandatory by default, did you change that in your DCA?
If so, you should add doNotSaveEmpty = true
, then the save_callback should automatically not be executed.
No I didn't change it. The field is mandatory as before, and it gives error when I try to save it. But the username is changed to blank. May be as you've suggested it should work if I add - doNotSaveEmpty = true, but I think it is better if we filter that in callback function.
Again another thing to check is, don't change username when new email is already in system. At the moment, although I get an error message saying email should be unique, the username is changed to the new email. This makes 2 members having same username but neither can login. I would suggest following filter in callback ... $objMember = $this->Database->prepare("SELECT id from tl_member WHERE email=?")->execute($strValue); if ($objMember->numRows > 0) { return $strValue; } ...
This should be changed in 1.0.4
When from is submitted with empty email, username is set to blank