Chronoforms 7 - User update

nyesteb 19 Dec, 2022
Hi,

I want to create a user update form. I use Save User, but no success. If I use the Update User function and select the User ID from update field, I cannot save nothing. What need to use in update field value? If I wrote here the user id field ({data:id}), then I get the error that Could not find this user account. If I leave it empty, then HY000, 1364, Field 'params' doesn't have a default value.

What is the problem?
Debug, but only from start:
Debug

Array
(
    [option] => com_chronoforms7
    [cont] => manager
    [chronoform] => felhasznalo
    [gpage] => end_page
    [id] => 941
    [nv] => Nyeste Balázs 2
    [felhasznl_nv] => nyesteb
    [email_cm] => balazs.nyeste@gmail.com
    [j_jelsz] => As180945_8890
    [adszm] => 123
    [bankszmlaszm] => 1242143232141
)
Array
(
    [read_data_6] => Array
        (
            [result] => Data read successfully!
            [log] => Array
                (
                    [0] => SELECT `Model6`.`id` AS `Model6.id`, `Model6`.`name` AS `Model6.name`, `Model6`.`username` AS `Model6.username`, `Model6`.`email` AS `Model6.email`, `Model6`.`password` AS `Model6.password`, `Model6`.`block` AS `Model6.block`, `Model6`.`sendEmail` AS `Model6.sendEmail`, `Model6`.`registerDate` AS `Model6.registerDate`, `Model6`.`lastvisitDate` AS `Model6.lastvisitDate`, `Model6`.`activation` AS `Model6.activation`, `Model6`.`params` AS `Model6.params`, `Model6`.`lastResetTime` AS `Model6.lastResetTime`, `Model6`.`resetCount` AS `Model6.resetCount`, `Model6`.`otpKey` AS `Model6.otpKey`, `Model6`.`otep` AS `Model6.otep`, `Model6`.`requireReset` AS `Model6.requireReset`, `Model6`.`authProvider` AS `Model6.authProvider` FROM `jm5nkj_users` AS `Model6` WHERE `Model6`.`id` = '941';
                )

            [var] => Array
                (
                    [Model6] => Array
                        (
                            [id] => 941
                            [name] => Nyeste Balázs
                            [username] => nyesteb
                            [email] => balazs.nyeste@gmail.com
                            [password] => $2y$10$7m7QXIB/X/SgGDE8EmnCLerrz1.gz5ymG5Wd1fF.MkuHVEqAhM6Wy
                            [block] => 0
                            [sendEmail] => 1
                            [registerDate] => 2022-11-10 10:19:43
                            [lastvisitDate] => 2022-12-19 08:58:02
                            [activation] => 0
                            [params] => {"admin_style":"","admin_language":"","language":"","editor":"","timezone":"","a11y_mono":"0","a11y_contrast":"0","a11y_highlight":"0","a11y_font":"0"}
                            [resetCount] => 0
                            [otpKey] => 
                            [otep] => 
                            [requireReset] => 0
                            [authProvider] => 
                        )

                )

        )

    [read_data_7] => Array
        (
            [result] => Data read successfully!
            [log] => Array
                (
                    [0] => SELECT `Model7`.`field_id` AS `Model7.field_id`, `Model7`.`item_id` AS `Model7.item_id`, `Model7`.`value` AS `Model7.value` FROM `jm5nkj_fields_values` AS `Model7` WHERE `Model7`.`item_id` = '941';
                )

            [var] => Array
                (
                    [0] => Array
                        (
                            [Model7] => Array
                                (
                                    [field_id] => 1
                                    [item_id] => 941
                                    [value] => 123
                                )

                        )

                    [1] => Array
                        (
                            [Model7] => Array
                                (
                                    [field_id] => 2
                                    [item_id] => 941
                                    [value] => 1242143232141
                                )

                        )

                )

        )

)



Thanks!
Balazs
Max_admin 21 Dec, 2022
you need to run an update if you want to update a user, and you need to have the where condition to id = user_id, where user_id the logged in user id, if you want users to update their accounts
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.

VPS & Email Hosting 20% discount
hostinger