</script>
<script type="text/javascript" src="{@RELATIVE_WCF_DIR}js/3rdParty/jquery.min.js"></script>
<script type="text/javascript" src="{@RELATIVE_WCF_DIR}js/3rdParty/jquery-ui.min.js"></script>
-<script type="text/javascript" src="{@RELATIVE_WCF_DIR}js/WCF.js"></script>
\ No newline at end of file
+<script type="text/javascript" src="{@RELATIVE_WCF_DIR}js/WCF.js"></script>
+<script type="text/javascript">
+ //<![CDATA[
+ WCF.User.init({$__wcf->user->userID}, '{@$__wcf->user->username|encodejs}');
+ //]]>
+</script>
<script type="text/javascript" src="{@RELATIVE_WCF_DIR}js/3rdParty/jquery-ui.min.js"></script>
<script type="text/javascript" src="{@RELATIVE_WCF_DIR}js/WCF.js"></script>
<script type="text/javascript" src="{@RELATIVE_WCF_DIR}acp/js/WCF.ACP.js"></script>
+ <script type="text/javascript">
+ //<![CDATA[
+ WCF.User.init({$__wcf->user->userID}, '{@$__wcf->user->username|encodejs}');
+ //]]>
+ </script>
{*
{if $specialStyles|isset}
}
};
+/**
+ * Holds userdata of the current user
+ */
+WCF.User = {
+ /**
+ * UserID of the user
+ *
+ * @var integer
+ */
+ userID: 0,
+
+ /**
+ * Username of the user
+ *
+ * @var string
+ */
+ username: '',
+
+ /**
+ * Initializes userdata
+ *
+ * @param integer userID
+ * @param string username
+ */
+ init: function(userID, username) {
+ this.userID = userID;
+ this.username = username;
+ }
+};
+
/**
* Basic implementation for WCF dialogs.
*/