# pion::net::PionUserManager Class Reference

`#include <PionUser.hpp>`

List of all members.

## Detailed Description

PionUserManager base class for PionUser container/manager

Definition at line 147 of file PionUser.hpp.

## Public Member Functions

| PionUserManager (void)
| construct a new PionUserManager object
virtual | ~PionUserManager ()
| virtual destructor
bool | empty (void) const
| returns true if no users are defined
virtual bool | addUser (const std::string &username, const std::string &password)
virtual bool | updateUser (const std::string &username, const std::string &password)
virtual bool | removeUser (const std::string &username)
virtual PionUserPtr | getUser (const std::string &username)
virtual PionUserPtr | getUser (const std::string &username, const std::string &password)

## Protected Types

typedef std::map< std::string, PionUserPtr > | UserMap
| data type for a map of usernames to user objects

## Protected Attributes

boost::mutex | m_mutex
| mutex used to protect access to the user list
UserMap | m_users
| user records container

## Member Function Documentation

virtual bool pion::net::PionUserManager::addUser | ( | const std::string & | username,
|  | const std::string & | password |
| ) |  |  | `[inline, virtual]`

used to add a new user with plaintext password

Parameters:

  | username | name or identifier of the user to add
  | password | plaintext password of the user to add

Returns:
  false if user with such a name already exists

Definition at line 172 of file PionUser.hpp.

virtual PionUserPtr pion::net::PionUserManager::getUser | ( | const std::string & | username,
|  | const std::string & | password |
| ) |  |  | `[inline, virtual]`

Used to locate user object by username and password

Definition at line 274 of file PionUser.hpp.

virtual PionUserPtr pion::net::PionUserManager::getUser | ( | const std::string & | username | ) | `[inline, virtual]`

Used to locate user object by username

Definition at line 262 of file PionUser.hpp.

virtual bool pion::net::PionUserManager::removeUser | ( | const std::string & | username | ) | `[inline, virtual]`

used to remove given user

Returns:
  false if no user with such username

Definition at line 250 of file PionUser.hpp.

virtual bool pion::net::PionUserManager::updateUser | ( | const std::string & | username,
|  | const std::string & | password |
| ) |  |  | `[inline, virtual]`

update password for given user

Parameters:

  | username | name or identifier of the user to update
  | password | plaintext password of the user to update

Returns:
  false if user with such a name doesn't exist

Definition at line 192 of file PionUser.hpp.

The documentation for this class was generated from the following file:

- net/include/pion/net/PionUser.hpp