Fork me on GitHub

UserUtil not found??  Bottom

  • Hi I try to fetch the username from an existing uid via UserUtil:

    Code

    UserUtil::getUserDynamicDataFields($this->uid, 'uname')

    And I receive the error:
    Fatal error: Class 'UserUtil' not found in /www/htdocs/.../modules/content/pncontenttypesapi/author.php on line 31

    Is there a special trick?


    --
    best regards from Kiel, sailing city

    Steffen Voss

    Member of the Zikula Steering Committee
    Read The Zikulan's Blog "If you want people to RTFM, make a better FM!"
  • Steffen,

    UserUtil isn't loaded by default so use Loader::loadClass('UserUtil'); to load the UserUtil class first.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Ah okay. Thanks. Which Utils are loaded by default? icon_wink

    --
    best regards from Kiel, sailing city

    Steffen Voss

    Member of the Zikula Steering Committee
    Read The Zikulan's Blog "If you want people to RTFM, make a better FM!"
  • The following are loaded by the core (as of .80RC2).

    SessionUtil
    PageUtil
    StringUtil
    ThemeUtil
    LogUtil
    DBConnectionStack
    ObjectUtil
    DBUtil
    RandomUtil
    DateUtil
    PNObject
    PNObjectArray
    FormUtil
    SecurityUtil
    CookieUtil
    WorkflowUtil

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Fine, thank you, Mark!

    --
    best regards from Kiel, sailing city

    Steffen Voss

    Member of the Zikula Steering Committee
    Read The Zikulan's Blog "If you want people to RTFM, make a better FM!"
  • This needs to be a module developers Wiki entry

    --
    Under Construction!
  • Well then... I'll be up at 6am and I'll have 3 eggs over easy, ham, bacon, hash browns and a damn strong cup of coffee.

    Thanks Mark icon_wink icon_lol

    --
    Under Construction!

This list is based on users active over the last 60 minutes.