Forum Activity

Forum feed

Want to add DUD values from X-User (not with FormExpress!)  Top

  • I'm using X-User for registration and I do not want to use FormExpress!

    I'm getting the regular user's registration data plus an additional field called _YPHONE. In XUser these values are in an array called $args.

    The rest I'm inserting in the user and xuser tables as usual but I want to insert $args['_YPHONE'] into the users DUD field called _YPHONE.


    I've searched for a clue and found out I need to use pnUserSetVar but I don't know how.

    x
  • Anybody? :? I still can't figure out how to use pnUserSetVar to insert dynamic user data.

    Code

    bool pnUserSetVar( mixed $name, mixed $value, value $)


    No $uid there. It comes from pnSessionGetVar. But if your registering a new user who presumably doesn't have a $uid until they submit how can you do this?

    X
  • Could I change one of the core user data fields like one of those instant messenger fields nobody uses? What would happen if I changed them to suit my purpose? I'd rather keep things the way they are but wouldn't that work? What else would be affected?

    X
  • Dear X,

    This will be great. A lot of people have asked about adding Dynamic User Data to the registration process and don't want to install two modules to do it. If you can do it without hacking the core, everything would be compatible with 0.8 which will have an improved Dynamic User Data system.

    I don't know any more than you but shouldn't _PHONE be dynadata[_PHONE] and doesn't X-User get $uid after it adds the new user and prior to adding the user to the xuser table?

    Signed your good and everlasting friend,

    X
  • http://noc.postnuke.com/tracker/index.php?func=detail&aid=1347&group_id=5&atid=101

    wink

    --
    Chestnut !
    Support via Private message won't be answered...
    http://dev.pnconcept.com
    http://www.postnuke-france.org
  • Thanks! That's exactly what I was thinking but are there any security issues?

    X
  • The function added in the file on the NOC is about the same than the original pnUserSetVar except that the uid created in the registration process is valid. The file also saves the optional items a little while later (after a DB error check for the other core fields). So if an error occurs in the normal saving, the dynamics are not saved uselessly.

    wink

    --
    Chestnut !
    Support via Private message won't be answered...
    http://dev.pnconcept.com
    http://www.postnuke-france.org

This list is based on the users active over the last 60 minutes.