Skip to content
General Revolution Evolution Add-ons International
Login | Register | MODX.com
MODX Open Source Content Management System, Framework, Platform and More.
Find a Partner | Hosts + SaaS | Jobs | Donate
  • RegisterSign Up with the MODX Community
  • LoginUse Your MODX.com Account
  • MODX Community Forums
  • Add-ons
  • Users, Authentication & Personalization
  •  
  • How to use extended profiles (MODX Revolution) [Solved]#

  • 25483
    740
    with regards,

    Ronald Lokers
    'Front-end developer' @ h2o Media

    ronaldlokers Reply #1, 7 months, 4 weeks ago

    Reply
    • Link to this post#1
    I want to store extra information with my users, the only option I see is to create extended fields per user.

    How can I add extended fields for every user at once instead of creating them manually for every user?


  • 3749
    11,692
    PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!

    MODx info for everyone: http://bobsguides.com/MODx.html

    BobRay Reply #2, 7 months, 4 weeks ago

    Reply
    • Link to this post#2
    In the future, there may be a checkbox for that option when you create an extended field.

    In the meantime, the only alternative would be a utility snippet or plugin, something like this:

    <?php
    $users = $modx->getCollection('modUser');
    
    foreach ($users as $user) {
    
         $profile = $user->getOne('Profile');
         $extendedFields = $profile->get('extended;)
         $extendedFields['newField'] = 'NewValue'; // could be ""
         $profile->set('extended', $extendedFields);
         $profile->save();
    }


  • 25483
    740
    with regards,

    Ronald Lokers
    'Front-end developer' @ h2o Media

    ronaldlokers Reply #3, 7 months, 4 weeks ago

    Reply
    • Link to this post#3
    Thx BobRay, I think that it is good enough for what I need at this moment


  • 32699
    263
    Author: MODX Revolution: Building The Web Your Way
    Visit my:
    MODx Revolution resources
    xPDO fully-functional examples


    Hire me:
    Sanity LLC

    W. Shawn Wilkerson Reply #4, 3 months, 1 week ago

    Reply
    • Link to this post#4
    I assume you know you could add hidden fields in the registration to create these on user creation as well:

                    <input type="hidden" name="januarySpaces" value="" />
                    <input type="hidden" name="januaryTables" value="" />
                    <input type="hidden" name="januaryChairs" value="" />
                    <input type="hidden" name="januaryNeedsElectric" value="" />
                    <input type="hidden" name="januaryMisc" value="" />





Actions

Login to Post

Other Support Options

To file a bug or make a feature request visit our issue tracker, or you can also purchase commercial support.

Love MODX?

If you build sites for a living with MODX or just love using it, why not give back?

Information

Posted in this thread:
BobRay, ronaldlokers, wshawn

 
Back to Top

MODX Global HQ

1333 N Stemmons Fwy, Ste 110
Dallas, TX 75207
United States

+1 (469) 777-MODX (6639)

The MODX Company

  • Contact
  • Media Center
  • Careers at MODX
  • Wall of Fame
  • The MODX Blog

Sponsors

SoftLayer Firehost: Secure Cloud Hosting

Stay Connected

Read our previous email newsletters.

Twitter Facebook Google+ LinkedIn github Feeds

Privacy Policy | Terms of Service | Pixels by AKTA Web Studio© 2005-2012 MODX. All rights reserved. Trademark Policy