- function get_profile($id) {
- if (is_numeric($id)) {
- return Profile::staticGet($id);
- } else {
- $user = User::staticGet('nickname', $id);
- if ($user) {
- return $user->getProfile();
- } else {
- return NULL;
- }
- }
- }
-
- function get_user($id) {
- if (is_numeric($id)) {
- return User::staticGet($id);
- } else {
- return User::staticGet('nickname', $id);
- }