If you're using the Auth Component, by default it stores all User field values in the user's session. You could compare the session value with the submitted value in the beforeSave method.
andrzejborkowski's suggestion could be better, however, depending on the instance. If you're using a "forgot password" option, using a secondary field to store the new password (rather than overwriting the original instantly), it won't lock the user out until they activate the new password when checking the re-activation email. On Nov 12, 12:30 pm, "[email protected]" <[email protected]> wrote: > u should add `email_temp` field in users table and overwrite `email` > after click information email i this is best method.. > > On 12 Lis, 17:49, "Dave" <[email protected]> wrote: > > > > > What is the best way to determine if a user changes a specific field when > > updating account? > > > I want to suspend the account when a user changes their email address and > > send out a confirmation email that they will have to confirm the address. I > > could make a separate form but that seems like over kill to make a new form > > just for 1 field. > > > I was thinking beforeSave() compare the new data field with the record if it > > matches no change so carry on....if its different then do what i need to do > > , send email...? > > > Anyone have ideas? Simple approach? > > > Thanks, > > > Dave- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
