- Moderated by:
- Support
-
- rank:
-
Softmore
- registered:
- November 2004
- Status:
- offline
- last visit:
- 06.03.06
- Posts:
- 66
Hi guys,
I have a question ... although I think I know the answer ...
In the API documentation ( http://docs.postnuke…w&f=pnapi/re50.html ) it says:
Quote
Other (user) variables will be made available in future releases of the API. You can register new user variables with the register_user_var module API function included in Modules module.
The register_user_var is not implemented yet and its been a while as I can see on these forum posts:
http://forums.postnuke.com/index.php?name=PNphpBB2&file=viewtopic&t=33357&highlight=registeruservar
http://forums.postnuke.com/index.php?name=PNphpBB2&file=viewtopic&t=13629&highlight=registeruservar
http://forums.postnuke.com/index.php?name=PNphpBB2&file=viewtopic&t=8751&highlight=registeruservar
Is there a new way of registering user variables since then?
Or
do i have to create a function that adds that manually
or even create my own table with such variables
or maybe use a hook everytime user gets created? (please give me more info on this one cause I do not know much about hooks)
In any case I think it would be good if "register_user_var" was implemented as it is a very important function ... you just have to define some sort of naming convention to ensure that the module defined variables do not have the same name with future PostNuke defined user variables.
Alexan -
- rank:
-
Steering Committee
- registered:
- August 2002
- Status:
- offline
- last visit:
- 03.03.08
- Posts:
- 1221
As you found out yourself, register_user_var is not in yet... So you cannot use a non core field by a non-existant name : EmailNotification
Use the dynamics for that.
Dynamic field : _EMAILNOTIFICATION
After it is created, you can do your :
Code
See this post for the available aliases and method to fetch core and dynamic fields.
--
Chestnut !
Support via Private message won't be answered...
http://dev.pnconcept.com
http://www.postnuke-france.org -
- rank:
-
Professional
- registered:
- December 1969
- Status:
- offline
- last visit:
- 10.01.08
- Posts:
- 1631
He is probably talking about this one: http://forums.postnu…pic&p=153145#153145 -
- rank:
-
Professional
- registered:
- December 1969
- Status:
- offline
- last visit:
- 10.01.08
- Posts:
- 1631
lol, thats why i always try to post my resolutions to posts after i get things fixed, etc. To archive the solution as I am ALWAYS searching these forums for answers. Forget documentation as it always falls behind, im for living documentation such as these forums. -
- rank:
-
Softmore
- registered:
- November 2004
- Status:
- offline
- last visit:
- 06.03.06
- Posts:
- 66
ok, thanks guys
I thought pnUserSetVar() would automaticallity create a variable for a user if it didn't exist .... it doesn't so everything is clear ...
might try to create the "register_user_var" function if i find the time ...
I 'll post it here if I do ...
cya
Alexan
