Skip to content

Instantly share code, notes, and snippets.

@angelxmoreno
Created May 27, 2014 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angelxmoreno/0609916e7b2fa82985c1 to your computer and use it in GitHub Desktop.
Save angelxmoreno/0609916e7b2fa82985c1 to your computer and use it in GitHub Desktop.
<?php
//if i dont have the id but i have the email
$email = 'johndoe@example.com';
$new_pass = 'cakephp2014'
$user_id = $this->field('id', array('email' => $email));
$this->User->save(array('id' => $user_id, 'password' => Security::hash($new_pass);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment