Location: PHPKode > scripts > Noostr > _engine/includes/users.php
<?php defined('SYSPATH') OR die('No direct access to this file is allowed.');

function get_user($uid = null) {
	global $ns, $db;
	$return = array();
	if (!isset($uid)) {
		global $site;
		if (isset($site->uri[1])) {
			$uid = $site->uri[1];
		} else {
			$uid = 0;
		}
	}
	$return = $db->query('select uid, nick, created, karma from '.PREFIX.'users where uid = ?', $uid);
	if (!is_array($return)) {
		$return[0] = $return;
	}
	if (count($return) < 1) {
		$return[0] = null;
	} else {
		$ns->userview = $return[0];
	}
	return $return[0];
}
Return current item: Noostr