public function addUser()
{
$username = empty($this->params['username']) ? $this->_generateRandomUsername() : $this->params['username'];
$username = $this->Users->generateUniqueUsername($username);
$password = empty($this->params['password']) ? $this->_generateRandomPassword() : $this->params['password'];
$email = empty($this->params['email']) ? $username . '@example.com' : $this->params['email'];
$user = ['username' => $username, 'email' => $email, 'password' => $password, 'active' => 1];
$userEntity = $this->Users->newEntity($user);
$userEntity->role = 'user';
$savedUser = $this->Users->save($userEntity);
$this->out(__d('CakeDC/Users', 'User added:'));
$this->out(__d('CakeDC/Users', 'Id: {0}', $savedUser->id));
$this->out(__d('CakeDC/Users', 'Username: {0}', $username));
$this->out(__d('CakeDC/Users', 'Email: {0}', $savedUser->email));
$this->out(__d('CakeDC/Users', 'Password: {0}', $password));
}