1
SERB-4-LIFE
Problems with "$user->getVar()" function

Hello,

I have problems displaying information from the user accounts in xoops, i added new fields to XOOPS user accounts and now i cant display them.

I tried this and it doesnt work.
$date_value $user->getVar("name_of_the_date_field_in_sql"); 
echo 
$date_value ;

and it doesnt display anything.

Can someone help me a bit with this.

Thank you.


Hey, my frend and resolved this problem but we have another one now, and its with this function.

$edituser->setVar("name_of_the_date_field_in_sql"new_value);


When we do this like for example this user has 10 points and we edit his account and add 5 more points, it becomes 15 so we put 15 in there and update. It doesnt do anything.

My frend said that with the first problem we had to add the sql field into the user.php file or something like that, so maybe its similar to this. But which file do we add the field to.

Thanks again.

2
Pnooka
Re: Problems with "$user->getVar()" function
  • 2006/7/3 6:06

  • Pnooka

  • Just popping in

  • Posts: 68

  • Since: 2004/7/16


You need to add a new into:
kernel/user.php
$this
->initVar('user_intrest'XOBJ_DTYPE_TXTBOXnullfalse150);
$this->initVar('user_mailok'XOBJ_DTYPE_INT1false);

something like this
$this
->initVar('name_of_the_date_field_in_sql'XOBJ_DTYPE_TXTAREAnullfalsenull);

3
SERB-4-LIFE
Re: Problems with "$user->getVar()" function

He did that for getVar but it doesnt work for setVar.

4
Pnooka
Re: Problems with "$user->getVar()" function
  • 2006/7/3 6:37

  • Pnooka

  • Just popping in

  • Posts: 68

  • Since: 2004/7/16


You might want to look at some of the existing values in edituser to better understand how this works. I did it myself successfully, after several attempts. By the way, this
$edituser->setVar("name_of_the_date_field_in_sql"new_value);

should look something like this:
$edituser->setVar("name_of_the_date_field_in_sql"$new_value);

5
SERB-4-LIFE
Re: Problems with "$user->getVar()" function

Hey sorry, um thats how it is i just made a mistake when i was typing it.

Login

Who's Online

176 user(s) are online (113 user(s) are browsing Support Forums)


Members: 0


Guests: 176


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits