diff --git a/sites/all/modules/login_one_time/login_one_time.module b/sites/all/modules/login_one_time/login_one_time.module
index d99657b..38bde2a 100755
--- a/sites/all/modules/login_one_time/login_one_time.module
+++ b/sites/all/modules/login_one_time/login_one_time.module
@@ -65,7 +65,7 @@ function login_one_time_settings() {
   $form['global']['login_one_time_expiry'] = array(
     '#type' => 'textfield',
     '#title' => t('Link expiry'),
-    '#default_value' => variable_get('login_one_time_expiry', ''),
+    '#default_value' => variable_get('login_one_time_expiry', 86400*14),
     '#size' => strlen(PHP_INT_MAX),
     '#maxlength' => strlen(PHP_INT_MAX),
     '#description' => t("How long, in seconds, before links expire.  Leave blank to default to two weeks (1,209,600 seconds)."),
@@ -628,6 +628,14 @@ function login_one_time_page(&$form_state, $uid, $timestamp, $hashed_pass) {
   else {
     // Time out, in seconds, until login URL expires. 24 hours = 86400 seconds.
     $timeout = variable_get('login_one_time_expiry', 86400*14);
+    
+    // Make sure we still set a valid timeout if the login_one_time_expiry variable exists
+    // but is empty. This could happen e.g. if the user enters a value then later deletes it
+    // on the config page.
+    if (!$timeout) {
+      $timeout = 86400*14;
+    }
+    
     $current = time();
     // Some redundant checks for extra security ?
     if ($timestamp < $current && $account = user_load(array('uid' => $uid, 'status' => 1)) ) {
