Index: shorturl.module
===================================================================
--- shorturl.module     (revision 7)
+++ shorturl.module     (working copy)
@@ -399,7 +399,7 @@
 *
 */
 function _shorturl_get_token($long_url) {
-
+  global $user;
   if (!variable_get('shorturl_allow_duplicates', 0)) { // skip this check if we allow duplicates
   //Do we already have this URL?
   $existing_id = db_result(db_query('SELECT lid FROM {shorturl_link} WHERE orig_url=\'%s\' ', $long_url));
