Esempio n. 1
0
 /**
  * Update a user
  *
  * @param array containing the key value pairs of columns to update
  * @param array key values pairs (value may be a string or an array)
  *                      This will construct the WHERE clause of your update
  *                      Be careful, if you leave this blank no WHERE clause
  *                      will be used and all users will be affected by the update
  * @return int|bool false on error, the affected rows on success
  *
  * @access public
  */
 function updateUser($data, $filters)
 {
     if (array_key_exists('passwd', $data)) {
         $data['passwd'] = $this->encryptPW($data['passwd']);
     }
     $result = $this->_storage->update('users', $data, $filters);
     // todo: notify observer
     return $result;
 }