[xoops-cvslog 6346] CVS update: xoops2jp/html/modules/user/class

Back to archive index

Minahito minah****@users*****
2007年 4月 25日 (水) 17:46:33 JST


Index: xoops2jp/html/modules/user/class/users.php
diff -u xoops2jp/html/modules/user/class/users.php:1.1.2.7.2.1 xoops2jp/html/modules/user/class/users.php:1.1.2.7.2.1.2.1
--- xoops2jp/html/modules/user/class/users.php:1.1.2.7.2.1	Thu Dec 28 12:16:26 2006
+++ xoops2jp/html/modules/user/class/users.php	Wed Apr 25 17:46:33 2007
@@ -43,6 +43,8 @@
 		$this->initVar('bio', XOBJ_DTYPE_TEXT, '', false);
 		$this->initVar('user_intrest', XOBJ_DTYPE_STRING, '', false, 150);
 		$this->initVar('user_mailok', XOBJ_DTYPE_BOOL, '1', false);
+		
+		$this->updateRank();
 	}
 	
 	function getGroups()
@@ -66,6 +68,18 @@
 		$this->_mGroupsLoadedFlag = true;
 	}
 
+	/**
+	 * Updates the rank value of this user.
+	 */	
+	function updateRank()
+	{
+		$handler =& xoops_getmodulehandler('ranks');
+		$rank =& $handler->get($this->get('rank'));
+		if ($rank == null || ($rank != null && !$rank->get('rank_special'))) {
+			$t_rank = xoops_getrank(0, $this->get('posts'));
+			$this->set('rank', $t_rank['id']);
+		}
+	}
 }
 
 class UserUsersHandler extends XoopsObjectGenericHandler
@@ -131,10 +145,6 @@
 			$limit=$criteria->getLimit();
 			$start=$criteria->getStart();
 		}
-		else {
-			$limit = $param1;
-			$start = $param2;
-		}
 		
 		$result = $this->db->query($sql, $limit, $start);
 		if (!$result) {


xoops-cvslog メーリングリストの案内
Back to archive index