ADD: added missing methods to set attributes

This commit is contained in:
Dominik Meyer 2024-02-18 13:53:24 +01:00
parent a441bbdc3a
commit 224e361420
Signed by: byterazor
GPG Key ID: EABDA0FD5981BC97
2 changed files with 63 additions and 0 deletions

View File

@ -147,6 +147,49 @@ namespace Redmine
*/
void setFirstName(const std::string &firstname);
/**
* @brief Set the Last Name of the user object
*
* *Remember:* you are only updating the local object!
*
* To change something on the server to have to call the appropriate API method.
*
* @param lastname - the new lastname of the user
*/
void setLastName(const std::string &lastname);
/**
* @brief Set the login of the user object
*
* *Remember:* you are only updating the local object!
*
* To change something on the server to have to call the appropriate API method.
*
* @param login - the new login of the user
*/
void setLogin(const std::string &login);
/**
* @brief Set the id of the user object
*
* *Remember:* you are only updating the local object!
*
* To change something on the server to have to call the appropriate API method.
*
* @param id - the new id of the user
*/
void setId(const std::string &id);
/**
* @brief Set the email of the user object
*
* *Remember:* you are only updating the local object!
*
* To change something on the server to have to call the appropriate API method.
*
* @param email - the new email of the user
*/
void setMail(const std::string &mail);
}; // class User

View File

@ -83,3 +83,23 @@ void Redmine::User::setFirstName(const std::string &firstname)
{
data_["user"]["firstname"]=firstname;
}
void Redmine::User::setLastName(const std::string &lastname)
{
data_["user"]["lastname"]=lastname;
}
void Redmine::User::setLogin(const std::string &login)
{
data_["user"]["login"]=login;
}
void Redmine::User::setId(const std::string &id)
{
data_["user"]["id"]=id;
}
void Redmine::User::setMail(const std::string &mail)
{
data_["user"]["mail"]=mail;
}