includefile(include/header)

COMMENT(manpage, section, releasedate, archive, short name)
manpage(FBB::User)(3bobcat)(_CurYrs_)(libbobcat-dev__CurVers_-x.tar.gz)
                    (/etc/passwd user info)

manpagename(FBB::User)(Provides the tt(/etc/passwd) info of the current user)

manpagesynopsis()
    bf(#include <bobcat/user>)nl()
    Linking option: tt(-lbobcat) 

manpagedescription()
    This class retrieves the information of the current user from the
information in tt(/etc/passwd). The class is a simple wrapper class around the
bf(getpwent)(3) function.

includefile(include/namespace)

manpagesection(INHERITS FROM)
    -

manpagesection(CONSTRUCTORS)
    itemization(
    itb(User())
        The default constructor determines the current user's data.  
        This constructor throws an tt(Exception) exception if it did not properly
complete because the current user name could not be found in tt(/etc/passwd).
    )
    The copy and move constructors are available.

manpagesection(OVERLOADED OPERATORS)

    The copy and move assignment operators are available.

manpagesection(MEMBER FUNCTIONS)
    itemization(
    itb(size_t eGroupid() const)
        Returns the user's tt(effective) group-id.
    itb(size_t eUserid() const)
        Returns the user's tt(effective) user-id.
    itb(size_t groupid() const)
        Returns the user's group-id.
    itb(std::string homedir() const)
        Returns the user's home directory (including a trailing tt(/)).
    itb(bool inGroup(size_t gid, bool useEffective = true) const)
       Returns tt(true) if the current user is a member of group tt(gid),
        otherwise tt(false) is returned. The user's effective group id is also
        checked if tt(useEffective) is specified as tt(true) (which is
        provided as default function argument).
    itb(std::string name() const)
        Returns the user's user-name.
    itb(std::string password() const)
        Returns the user's encrypted password. But see also the bf(BUGS) \
        section. 
    itb(std::string realname() const)
        Returns the user's real name, as listed in the tt(/etc/passwd)'s \
        em(gecos) field.
    itb(std::string shell() const)
        Returns the user's shell.
    itb(size_t userid() const)
        Returns the user's user-id.
    )

manpagesection(EXAMPLE)
    verbinclude(../../user/driver/driver.cc)

manpagefiles()
    em(bobcat/user) - defines the class interface

manpageseealso()
    bf(bobcat)(7), bf(getpwent)(3)

manpagebugs()
    If the user is a member of multiple groups, only the group id listed in
tt(/etc/passwd) is returned by bf(groupid()).

    If shadow passwording is used, the string returned by bf(password()) will
probably not contain the encrypted password.

includefile(include/trailer)
