/** * Shows a small module of the API keys for the user provided. If no user is provided, uses the currently logged in user. * * Allows explicitly specifying the keys (for performance reasons, if you've already looked them up). * * @param userId - mixed - (optional) userId of the user whose keys should be shown. If null or not provided, then it will use * the currently logged in user. * @param keyData - array - (optional) array of keys and key nicknames for the user in the format provided by ApiGate::getKeyDataByUserId. * If provided, this will be assumed to be the correct list of keys * so they will not be looked up from the database using the userId provided (or the default user as described in userId's * param documentation above. */ public function subpage_userKeys($userId = null, $keyData = null) { wfProfileIn(__METHOD__); if ($userId == null) { $userId = ApiGate_Config::getUserId(); } if ($keyData == null) { $keyData = ApiGate::getKeyDataByUserId($userId); } $data = array('userId' => $userId, 'keyData' => $keyData); $html = ApiGate_Dispatcher::renderTemplate("userKeys", $data); wfProfileOut(__METHOD__); return $html; }