private function processChangePassword(User $user, $password, $confirmPassword)
    {
        if (empty($password)) {
            return Errors::PASSWORD_INVALID;
        }

        if ($password !== $confirmPassword) {
            return Errors::CONFIRM_PASSWORD_INVALID;
        }

        /** @var UserMapper $mapper */
        $mapper = MapperFactory::getUserMapper();

        $user->setPassword($password);
        $mapper->update($user);

        // Now login this user.
        return $this->module->login($this->request, $user);
    }