We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to get Userid in new version oxwall? | Forum

Topic location: Forum home » Support » General Questions
Evgeni Samoilov
Evgeni Samoilov Feb 19 '16

Hi , I have a problem with getting userid in new version, I was looking for examples and found it:

$userId = (int) $paramObject->additionalParamList['entityId'];,

But it's cod returned 0

$id = OW::getUser()->getId();

This cod not working and crash with error: Class 'OW' not found.

Please help)

ross Team
ross Feb 22 '16

public function getId()

    {

        return ( $this->user === null ) ? 0 : $this->user->getId();

    }


in ow_core/user.php file 

ross Team
ross Feb 22 '16
$id = OW::getUser()->getId();

please provide the whole code you're using

as the method is correct.