/** * Given a result record from a Execute call, it will fill in the * fields of the object, so that we don't have to repeat the same * code too many times */ function _fillUserInformation($query_result, $extraInfo = false) { $userInfo = new UserInfo($query_result["user"], $query_result["password"], $query_result["email"], $query_result["about"], $query_result["full_name"], $query_result["resource_picture_id"], unserialize($query_result["properties"]), $query_result["id"]); if ($extraInfo) { // load this data if explicitely required! $userBlogs = $this->getUsersBlogs($userInfo->getId()); $userInfo->setBlogs($userBlogs); } // set some permissions //$userInfo->setSiteAdmin($this->perms->isSiteAdmin( $userInfo->getId())); $userInfo->setSiteAdmin($query_result["site_admin"]); $userInfo->setStatus($query_result["status"]); return $userInfo; }