Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Dynamic user data and standard user data
-
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
Im finding it to be really annoying when trying to call Dynamic user data versus standard user data. Using something like pnUserGetVar('uname') works just fine to get their user name, but if I wanted to get their lastname, which is a dynamic field i have setup, pnUserGetVar('lastname'). I would be completely out of luck. How am I supposed to reference this data? My site revolves around the users dynamic data inputs, such as lastname, first name, city, etc, etc. Any help would be appreciated. -
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
Just a note. I know how to call them in templates, but not in the actual PHP code. I know it should be similiar, but im not getting it for some reason. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Jun 24, 2005
- Posts: 27
Have you setup your module to function like in the pnMDG for using dynamic user vars?
http://docs.postnuke.com/index.php?module=Static_Docs&func=view&f=pnmdg/ch02s02.html -
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
-
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
ok, i guess I got it to work, not sure why it didnt before. Here is an example.
$LASTNAME = pnUserGetVar('_LASTNAME');
echo $LASTNAME; -
**unknown user**
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 1097
Core fields are aliased...
Dynamics are not and so are referenced by their proplabel information
core aliases :
Code
$uid = pnUserGetVar('uid');
$uname = pnUserGetVar('uname');
$name = pnUserGetVar('name');
$email = pnUserGetVar('email');
$femail = pnUserGetVar('femail');
$url = pnUserGetVar('url');
$timezone_offset = pnUserGetVar('timezone_offset');
$user_avatar = pnUserGetVar('user_avatar');
$user_icq = pnUserGetVar('user_icq');
$user_aim = pnUserGetVar('user_aim');
$user_yim = pnUserGetVar('user_yim');
$user_msnm = pnUserGetVar('user_msnm');
$user_from = pnUserGetVar('user_from');
$user_occ = pnUserGetVar('user_occ');
$user_intrest = pnUserGetVar('user_intrest');
$user_sig = pnUserGetVar('user_sig');
$bio = pnUserGetVar('bio');
//OR
$userinfo = pnUserGetVars($uid);
$uname = userinfo['uname'];
$name = userinfo['uname'];
$email = userinfo['uname'];
$femail = userinfo['uname'];
$url = userinfo['uname'];
$timezone_offset = userinfo['timezone_offset'];
$user_avatar = userinfo['user_'];
$user_icq = userinfo['user_'];
$user_aim = userinfo['user_'];
$user_yim = userinfo['user_'];
$user_msnm = userinfo['user_'];
$user_from = userinfo['user_'];
$user_occ = userinfo['user_'];
$user_intrest = userinfo['user_'];
$user_sig = userinfo['user_'];
$bio = userinfo['bio'];
I may forget one or two...
And as you found out, dynamics are by their label
Code
$_TEST = pnUserGetVar('_TEST');
//or
$_TEST = $userinfo['_TEST']; -
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
