diff --git a/include/class.osticket.php b/include/class.osticket.php
index fd300184a96b985b1c1b1022817b2b11e85fc4aa..89fd3603c4f7b876df756157a2aef89e51bdab79 100644
--- a/include/class.osticket.php
+++ b/include/class.osticket.php
@@ -119,7 +119,15 @@ class osTicket {
 
         return false;
     }
-    
+
+    function getLinkToken() {
+        return md5($this->getCSRFToken().SECRET_SALT.session_id());
+    }
+
+    function validateLinkToken($token) {
+            return ($token && !strcasecmp($token, $this->getLinkToken()));
+    }
+
     function isFileTypeAllowed($file, $mimeType='') {
        
         if(!$file || !($allowedFileTypes=$this->getConfig()->getAllowedFileTypes()))