mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
- more tests - make session_id optional, if not set take Login-Server Cookie - check only for password_old if user was logged in with password, else reset password from email wouldn't work - make successfull change password also add 1 to valid_values - don't update other fields in db if only update password was called
28 lines
763 B
C++
28 lines
763 B
C++
#ifndef __JSON_INTERFACE_JSON_UPDATE_USER_INFOS_
|
|
#define __JSON_INTERFACE_JSON_UPDATE_USER_INFOS_
|
|
|
|
#include "JsonRequestHandler.h"
|
|
|
|
/*!
|
|
* @author Dario Rekowski
|
|
* @date 2020-07-30
|
|
* @brief to update non critical user data like first-name and last-name from community server with valid login-server session id
|
|
*
|
|
* works only for admins
|
|
*/
|
|
|
|
class JsonUpdateUserInfos : public JsonRequestHandler
|
|
{
|
|
public:
|
|
JsonUpdateUserInfos(Session* session);
|
|
Poco::JSON::Object* handle(Poco::Dynamic::Var params);
|
|
|
|
protected:
|
|
|
|
std::string validateString(Poco::Dynamic::Var value, const char* fieldName, Poco::JSON::Array& errorArray);
|
|
bool isOldPasswordValid(Poco::JSON::Object::Ptr updates, Poco::JSON::Array& errors);
|
|
|
|
|
|
};
|
|
|
|
#endif // __JSON_INTERFACE_JSON_UPDATE_USER_INFOS_
|