#include <User.h>
Public Member Functions | |
AdminUser (Row &aRow) | |
Constructs an instance of AdminUser and fill it with data taken from mysqlpp::Row. | |
Basket * | getBasket () |
Order * | placeOrder () throw (string) |
vector< User * > & | userList () |
Returns the list of currently registered users, even if locked. | |
bool | changeUserPassword (User &anUser, string aPasswd) |
Let an administrator to change a user password: this method could also be used to disable a user login. | |
void | showMonthlyTrend () |
Displays the monthly trend of sales, grouped by year/month. |
AdminUser::AdminUser | ( | Row & | aRow | ) |
Constructs an instance of AdminUser and fill it with data taken from mysqlpp::Row.
aRow | Record fetched from the database |
Referenced by userList().
bool AdminUser::changeUserPassword | ( | User & | anUser, | |
string | aPasswd | |||
) |
Let an administrator to change a user password: this method could also be used to disable a user login.
To make this change persistent, remember to commit by calling store().
[in] | anUser | Instance of user to alter |
[in] | aPasswd | New password to assign |
References KEY_USR_PASSWD, ManagedObject::setValueForKey(), and ManagedObject::update().
Referenced by UserMenu::disableUser().
void AdminUser::showMonthlyTrend | ( | ) |
Displays the monthly trend of sales, grouped by year/month.
References Database::getConnection(), Database::Instance(), Database::printResult(), and QUERY_ADMIN_TREND.
Referenced by UserMenu::displayMonthlyTrend().
vector< User * > & AdminUser::userList | ( | ) |
Returns the list of currently registered users, even if locked.
References AdminUser(), Database::getConnection(), Database::Instance(), KEY_USR_ADMIN, and QUERY_ADMIN_USERLST.
Referenced by UserMenu::disableUser().