Esempio n. 1
0
 /**
  * Add a user
  *
  * @param array containing atleast the key-value-pairs of all required
  *              columns in the users table
  * @return int|bool false on error, true (or new id) on success
  *
  * @access public
  */
 function addUser($data)
 {
     // todo: does this work?
     if (array_key_exists('passwd', $data)) {
         $data['passwd'] = $this->encryptPW($data['passwd']);
     }
     $result = $this->_storage->insert('users', $data);
     // todo: notify observer
     return $result;
 }