/** static */ function getSmartyData($userid) { $o = new sotf_UserData(); if ($o->hasPostData()) { $o->copyPostData(); } elseif ($userid) { $o->set('user_id', $userid); $o->find(); } return $o->getAll(); }