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

Coding to pull latest member name?

Discussion in 'XenForo Development Discussions' started by Smooth, Aug 31, 2011.

  1. Smooth

    Smooth Active Member

    Hey all :)

    Is there a code to pull the latest members username?

    We would like to put a notice on our homepage to welcome the latest newcomer.

    Many thanks :)
  2. ragtek

    ragtek Guest

    The user model provides a method for this
         * Fetch the most recently-registered users
         * @param array $criteria
         * @param array $fetchOptions
         * @return array User records
    public function getLatestUsers(array $criteria, array $fetchOptions = array())
    $fetchOptions['order'] = 'register_date';
    $fetchOptions['direction'] = 'desc';

  3. Smooth

    Smooth Active Member

    Thank you! :)

    Is there a way to pull this coding into a normal post rather than template?

    Not to worry if not :)

Share This Page