Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Add an additional field for the user

 

 


Djulia
User

Apr 3, 2008, 3:14 PM

Post #1 of 5 (218 views)
Shortcut
Add an additional field for the user Can't Post

Hi,

I would like to add an additional field for the user.
Admin > User Accounts > modify

For example :
Phone
Mailing Address

Is that possible ?

Thank you for your assistance.

Djulia


Dave
Staff / Moderator


Apr 3, 2008, 3:52 PM

Post #2 of 5 (216 views)
Shortcut
Re: [Djulia] Add an additional field for the user [In reply to] Can't Post

You can edit the (hidden) User Accounts section with this url:

admin.php?menu=database&action=editTable&tableName=accounts

Just be sure to backup /data/schema/accounts.ini.php and not overwrite it next time you upgrade!

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com


Djulia
User

Apr 4, 2008, 8:12 AM

Post #3 of 5 (205 views)
Shortcut
Re: [Dave] Add an additional field for the user [In reply to] Can't Post

Thank you Dave, that helps much. Smile

But, I have another problem.
Now, I would like to obtain the values of the accounts table on my page (myPage.php).

For example :

Created by <?php echo $pageRecord['username'] ?>

There is a possible solution ?

Thank you for your assistance.

Djulia


Dave
Staff / Moderator


Apr 4, 2008, 9:18 AM

Post #4 of 5 (203 views)
Shortcut
Re: [Djulia] Add an additional field for the user [In reply to] Can't Post

The software doesn't support that functionality directly but you could do it with some PHP code. Use this (or something similar) where $record['createdByUserNum'] is defined. Note that if your variable is called $pageRecord you'll need to rename $record to that in this code:


Code
<?php // load user 
$query = "SELECT * FROM {$TABLE_PREFIX}accounts WHERE num = '{$record['createdByUserNum']}'";
$result = mysql_query($query) or die("MySQL Error: ". htmlspecialchars(mysql_error()) . "\n");
$createdByUserRecord = mysql_fetch_assoc($result);
?>


Then you can display user fields like this:


Code
<?php echo $createdByUserRecord['fullname'] ?>


And list all the user fields (for testing) like this:


Code
<xmp><?php print_r($createdByUserRecord); ?></xmp>


Hope that helps! :)

Dave Edis - Senior Developer
interactivetools.com


Djulia
User

Apr 4, 2008, 10:08 AM

Post #5 of 5 (200 views)
Shortcut
Re: [Dave] Add an additional field for the user [In reply to] Can't Post

It is perfect, thank you Dave. Smile

Djulia

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4