function find_club($name) { return \bmtmgr\User::find_by_input($name); }
function find_by_token($table, $token) { $now = time(); return \bmtmgr\User::fetch_optional('WHERE user.id = ' . $table . '.user_id AND ' . $table . '.token = ? AND ' . $table . '.expiry_time > ?', array($token, $now), array($table)); }