xoops forums

jitao

Just popping in
Posted on: 2003/11/28 17:11
jitao
jitao (Show more)
Just popping in
Posts: 1
Since: 2003/11/28
#1

A basic question about the methods of XoopsUser class

Hi, Just start learning to extend the xoops, but have a basic question about the methods in XoopsUser class. There is a line saying
"//### Methods from here below will be deprecated. ###"
What are the better ways/ methods to use if those methods are depreciated? I can not find any clue in the API documents. Please help me.
Thank you,
Ji Tao

skalpa

Quite a regular
Posted on: 2003/11/28 17:37
skalpa
skalpa (Show more)
Quite a regular
Posts: 300
Since: 2003/4/16
#2

Re: A basic question about the methods of XoopsUser class

Well, I can't find this message in my version so I'm not sure what methods you're talking about.
Now if these are the vars related ones, the solution is in front of you
This one is deprecated:
function uid()
    {
        return 
$this->getVar("uid");
    }


So don't use $myobj->uid();
but $myobj->getVar('uid');
instead....

And this generally applies to all the deprecated methods: the "old one" has been kept for compatibility reasons, but the alternate way of doing things is in the function body.

Skalpa.>