If you really did set "username, email to unique" and not "username
unique and email unique" (see the difference?) all is as it should be.
In the first instance (one index combining the two fields) would have
to have the same username and email combination for MySQLs index to
throw an error.

Is that it, you think?

/Martin



On Sep 15, 12:28 pm, "vla...@gmail.com" <vla...@gmail.com> wrote:
> Cake PHP 1.2.5, MySQL 5.*
>
> What I have:
>
> model user (all default) and:
>
>  var $validate = array(
>           'username' => 'alphaNumeric',
>           'password' => 'notEmpty',
>           'name' => 'notEmpty',
>           'email' => 'email',
>         );
>
> In MySQL I set for this table (users) fields: username, email - unique
>
> Also add Security component for security ;-)
>
> Now, I add ticket component for password remainding. And make a
> mistake:
>
> /users/remind.ctp:
>
> <div class="users form">
> <?php echo $form->create('User');?>
>         <?php
>                 echo $form->input('email');
>         ?>
> <?php echo $form->end('Submit');?>
> </div>
>
> As you see form->create - I generate form /users/add
>
> So. I write in one field my email (already present in DB) and got
> message "User was added"
>
> I don't believe it. But in Mysql table I see record with email (which
> was present second time!) and other empty fields.
>
> How it possible???
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to