1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How recover username or userId = ...

Discussion in 'XenForo Development Discussions' started by Zephyr, Oct 1, 2012.

  1. Zephyr

    Zephyr Well-Known Member

    Hello, how can I retrieve a list of username since their id please ?
    And how can I retrieve a the username to owner message in which I am (edition) ?

    I use a .php Thank :)
  2. Insy

    Insy Well-Known Member

    // One user
    $user XenForo_Model::create('XenForo_Model_User')->getUserById($id);

    // Many users
    $ids = array(123);
    $users =  XenForo_Model::create('XenForo_Model_User')->getUsersByIds($ids);
    foreach (
    $users as $id => $user) {
    Zephyr likes this.
  3. Zephyr

    Zephyr Well-Known Member

    Thank Insy :)

Share This Page