20 defined(
'XOOPS_ROOT_PATH') or die('Restricted access');
35 var $_groups = array();
50 var $_isOnline = null;
94 $this->assignVars($id);
98 foreach (
$user->vars as $k => $v) {
99 $this->assignVar($k, $v[
'value']);
124 function getUnameFromId($userid, $usereal = 0)
126 $userid = intval($userid);
127 $usereal = intval($usereal);
131 if (is_object(
$user)) {
134 $name =
$user->getVar(
'name');
136 return $ts->htmlSpecialChars($name);
138 return $ts->htmlSpecialChars(
$user->getVar(
'uname'));
141 return $ts->htmlSpecialChars(
$user->getVar(
'uname'));
145 return $GLOBALS[
'xoopsConfig'][
'anonymous'];
153 function incrementPost()
156 return $member_handler->updateUserByField($this,
'posts', $this->getVar(
'posts') + 1);
164 function setGroups($groupsArr)
166 if (is_array($groupsArr)) {
167 $this->_groups =& $groupsArr;
176 function &getGroups()
178 if (empty($this->_groups)) {
180 $this->_groups =
$member_handler->getGroupsByUser($this->getVar(
'uid'));
182 return $this->_groups;
224 if (!isset($this->_rank)) {
225 $this->_rank =
xoops_getrank($this->getVar(
'rank'), $this->getVar(
'posts'));
236 if ($this->getVar(
'level') == 0) {
248 if (!isset($this->_isOnline)) {
250 $this->_isOnline = ($onlinehandler->getCount(
new Criteria(
'online_uid', $this->getVar(
'uid'))) > 0) ?
true :
false;
252 return $this->_isOnline;
259 function uid($format =
'')
261 return $this->getVar(
'uid', $format);
268 function id($format =
'N')
270 return $this->getVar(
'uid', $format);
278 function name($format =
'S')
280 return $this->getVar(
'name', $format);
288 function uname($format =
'S')
290 return $this->getVar(
'uname', $format);
299 function email($format =
'S')
301 return $this->getVar(
'email', $format);
304 function url($format =
'S')
306 return $this->getVar(
'url', $format);
309 function user_avatar($format =
'S')
311 return $this->getVar(
'user_avatar', $format);
314 function user_regdate($format =
'')
316 return $this->getVar(
'user_regdate', $format);
319 function user_icq($format =
'S')
321 return $this->getVar(
'user_icq', $format);
324 function user_from($format =
'S')
326 return $this->getVar(
'user_from', $format);
329 function user_sig($format =
'S')
331 return $this->getVar(
'user_sig', $format);
334 function user_viewemail($format =
'')
336 return $this->getVar(
'user_viewemail', $format);
339 function actkey($format =
'')
341 return $this->getVar(
'actkey', $format);
344 function user_aim($format =
'S')
346 return $this->getVar(
'user_aim', $format);
349 function user_yim($format =
'S')
351 return $this->getVar(
'user_yim', $format);
354 function user_msnm($format =
'S')
356 return $this->getVar(
'user_msnm', $format);
359 function pass($format =
'')
361 return $this->getVar(
'pass', $format);
364 function posts($format =
'')
366 return $this->getVar(
'posts', $format);
369 function attachsig($format =
'')
371 return $this->getVar(
'attachsig', $format);
374 function level($format =
'')
376 return $this->getVar(
'level', $format);
379 function theme($format =
'')
381 return $this->getVar(
'theme', $format);
384 function timezone($format =
'')
386 return $this->getVar(
'timezone_offset', $format);
389 function umode($format =
'')
391 return $this->getVar(
'umode', $format);
394 function uorder($format =
'')
396 return $this->getVar(
'uorder', $format);
400 function notify_method($format =
'')
402 return $this->getVar(
'notify_method', $format);
405 function notify_mode($format =
'')
407 return $this->getVar(
'notify_mode', $format);
410 function user_occ($format =
'S')
412 return $this->getVar(
'user_occ', $format);
415 function bio($format =
'S')
417 return $this->getVar(
'bio', $format);
420 function user_intrest($format =
'S')
422 return $this->getVar(
'user_intrest', $format);
429 function getProfile()
431 trigger_error(__CLASS__ .
"::" . __FUNCTION__ .
' is deprecated', E_USER_WARNING);
475 parent::__construct(
$db,
'users',
'XoopsUser',
'uid',
'uname');
482 trigger_error(__CLASS__ .
"::" . __FUNCTION__ .
' is deprecated', E_USER_WARNING);
487 trigger_error(__CLASS__ .
"::" . __FUNCTION__ .
' is deprecated', E_USER_WARNING);