Forums

Joomla Account Details Update : Validation Checks + Password

mapme 03 May, 2012
Hi,
I am looking to use Chronoforms to update a Joomla account.
However, when I set up a Password updater, the new password stores in the MySQL as unencrypted.
I also want to use the Email updater to check if that email exists (like the CF Registration action).
Finally, I want to add a confirm new password features so that they match up.

All this can be done for the Joomla Registration action, but not sure how to proceed for profile updates.

I am using CF 4.0 RC3.11 and Joomla 2.5.4

Thanks,

Brendan
GreyHead 06 May, 2012
Hi mapme,

You have to dig into the Joomla! User code and find the correct snippet to use to create a password hash and store that in the database. From memory there isn't a User object method for this so it has to be hard coded.

Bob
Max_admin 11 May, 2012
Hello,

There is already a CF Action to save/update user accounts in the last release, did you check that ?

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
menchee 28 May, 2012
Hi Max,
The plugin you mentioned looks promising, but I'm a bit confused:

[list]
  • Should we use it INSTEAD of the user_registration plugin? or we should create one form for registration and another one for update?

  • And if it is good for both jobs, what will be the parameter we should use, during registration, in order to pass the new user id to a second table, into the cf_user_id field (for extended user details)?

  • And how should we use the 'Function' and 'Enable Old Password' (in the settings tab)? The 'update self' is not clear to me. For me, logically, if I can pull a user id from the $user, then it is 'update'. If not, then it is 'create'. So what does the 'update self' mean?

  • And what is the purpose of 'Usertype field name'? Should we create it just for the needs of the plugin?

  • [/list]
    I know. Many questions, but if you can answer them all, I believe that we'll save a lot of threads...

    Thanks,
    Emanuel.
    Max_admin 19 Jun, 2012
    Hi Emanuel,

    Sorry, didn't see this post before, I will try top answer all:
    #1- the registration action should be for registration purposes only, the update one should be for updates purposes, by admin or by the user him/her self.
    #2- "update self" is when the user is updating his own profile for example, the "user type" field is the name of the field which is going to have the group id, useful if you are having a dynamic list of groups.

    You can contact me through the "Contact Us" page for more info on this, just explain to me what you need to do and I may have something helpful in the works for you😉

    Regards,
    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    menchee 19 Jun, 2012
    Hi Max,
    Thanks for replying and answering(though it is so long after I asked my questions...).

    Meanwhile, I figured it out and managed to set well working forms for registration and update.
    Still working on some validation issues (Ajax check for existing email and user name, raising the existing error balloons), but dealing with the database works fine for me!

    I'm writing a detailed tutorial on these subjects. When they will be ready, I'll send it to you for fine tuning, since everything I know is based on trial and errors, not facts...

    Man, I love your extensions!!! I only wish we had a detailed documentation of each and every item...

    Thanks again,
    Emanuel.
    ashwinuae 09 Dec, 2012
    Hi,

    Just a quick question in connection to this topic.

    So I'm setting up a basic Joomla Profile Update form in CFv4. In the 'Joomla User Create/Update' option, there is a Usertype & Usertype field name setting.

    Are these currently ignored for existing logged in users who are trying to update their profile? Because setting anything there doesn't seem to effect any change.

    Also, on the other hand, keeping the selection empty breaks the form, as on submit, it ends up on a blank page.

    A clarification on these would be awesome! 🙂

    Thanks in advance!
    GreyHead 12 Dec, 2012
    Hi ashwinuae ,

    I'm not certain but I think that you need to set the 'Function' option on the Settings tab to 'Update Self' to change settings for the current user.

    Bob

    Bob
    menchee 14 Dec, 2012
    Hi ashwinuae,
    It took me a while to set this entire update form and that was a long time ago, so I don't remember every reason for my setup, but related to your question, I can tell you that:

    1. I added a hidden filed with the id and name of 'usertype'.
    2. I wrote this name in the 'Usertype & Usertype field name' input field
    3. As Bob mentioned, I set the 'Function' to 'Update-Self'

    In my case, I have two table to update - the core Joomla user table and an extension I added. I can't tell you for sure if what I set is right for a single core table update...

    Theoretically, this 'Joomla User Create/update' action can handle new users as well (that's why there is a Usertype list to choose from for default usertype/group), but I just set two different forms - one for new users and one for update.

    Emanuel.
    melindamak 12 Jul, 2013
    Hi Emanuel,

    I had gone through the joomla user update CF action and also want to do something like yours, but I have got those validation errors on username and email address. Do u have any idea how to fix these validation errors to allow the joomla user update on password and name??

    Thanks.

    Melinda
    This topic is locked and no more replies can be posted.