|
@@ -127,4 +127,24 @@ class user_helper
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ static public function get_mobile_contacts($member_id)
|
|
|
+ {
|
|
|
+ $data = array();
|
|
|
+ if (isset($member_id) && !empty($member_id)) {
|
|
|
+ $prefix = "mb_";
|
|
|
+ $key = "mobilecontacts_{$member_id}";
|
|
|
+
|
|
|
+ $ret = rcache($key,$prefix);
|
|
|
+ if (empty($ret)) {
|
|
|
+ $data = Model()->table("mobile_contacts")->field('friend_contacts')->where(array("member_id"=>$member_id))->find();
|
|
|
+ wcache($key,array("contacts_list"=>$data["friend_contacts"]),$prefix);
|
|
|
+ $data = unserialize($data["friend_contacts"]);
|
|
|
+ } else {
|
|
|
+ $data = unserialize($ret["contacts_list"]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return $data;
|
|
|
+ }
|
|
|
}
|