 |

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. 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:
<?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:
<?php echo $createdByUserRecord['fullname'] ?> And list all the user fields (for testing) like this:
<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. Djulia
|
|
|  |
|