-// Run SQL command
-$result = SQL_QUERY_ESC("SELECT ".$data.", beg_clicks
-FROM `{!_MYSQL_PREFIX!}_user_data`
-WHERE userid=%s
-LIMIT 1", array($uid), __FILE__, __LINE__);
-list($uid, $clicks) = SQL_FETCHROW($result);
-SQL_FREERESULT($result);
-
-// Set User-ID when no nickname was found
-$nickname = true;
-if (empty($uid)) { $uid = $GLOBALS['userid']; $nickname = false; }
+if ((!isExtensionActive('beg')) && (!isAdmin())) {
+ displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=beg%}');
+ return;
+} // END - if