Ejemplo n.º 1
0
 /**
  * Reads users data from database and returns them as array when
  * key is user id and value is array of user values
  *
  * @param DataObjects_Users $doUsers
  * @return array
  */
 function _buildUsersTable(&$doUsers)
 {
     $aUsers = array();
     while ($doUsers->fetch()) {
         $aUsers[$doUsers->user_id] = $doUsers->toArray();
         // is user linked to his last account
         $aUsers[$doUsers->user_id]['toDelete'] = $doUsers->countLinkedAccounts() == 1;
     }
     return $aUsers;
 }
 /**
  * A method to change a user email
  *
  * @param DataObjects_Users $doUsers
  * @param string $emailAddress
  * @param string $password
  * @return bool
  */
 function changeEmail(&$doUsers, $emailAddress, $password)
 {
     $doUsers->email_address = $emailAddress;
     $doUsers->email_updated = $doUsers->formatDate(new Date());
     return true;
 }