Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Want to add DUD values from X-User (not with FormExpress!)
  • Posted: 04.12.2004, 07:19
     
    RacerX
    rank:
    Helper Helper
    registered:
     March 2004
    Status:
    offline
    last visit:
    10.02.06
    Posts:
    113
    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
  • Posted: 04.12.2004, 20:07
     
    RacerX
    rank:
    Helper Helper
    registered:
     March 2004
    Status:
    offline
    last visit:
    10.02.06
    Posts:
    113
    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
  • Posted: 04.12.2004, 21:44
     
    RacerX
    rank:
    Helper Helper
    registered:
     March 2004
    Status:
    offline
    last visit:
    10.02.06
    Posts:
    113
    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
  • Posted: 04.12.2004, 23:57
     
    RacerX
    rank:
    Helper Helper
    registered:
     March 2004
    Status:
    offline
    last visit:
    10.02.06
    Posts:
    113
    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
  • Posted: 05.12.2004, 00:05
     
    Chestnut
    rank:
    Steering Committee Steering Committee
    registered:
     August 2002
    Status:
    offline
    last visit:
    03.03.08
    Posts:
    1221
    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
  • Posted: 05.12.2004, 00:36
     
    RacerX
    rank:
    Helper Helper
    registered:
     March 2004
    Status:
    offline
    last visit:
    10.02.06
    Posts:
    113
    Thanks! That's exactly what I was thinking but are there any security issues?

    X
  • Posted: 06.12.2004, 00:01
     
    Chestnut
    rank:
    Steering Committee Steering Committee
    registered:
     August 2002
    Status:
    offline
    last visit:
    03.03.08
    Posts:
    1221
    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

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula