Ejemplo n.º 1
0
         } else {
             user_login("", "", $new_user_id, 0, "", false, $errors);
         }
     }
 }
 // notifications block
 if ($new_user_added) {
     $registration_date = $r->get_value("registration_date");
     $registration_date_string = va_date($datetime_show_format, $registration_date);
     $admin_notification = get_setting_value($user_profile, "admin_notification", 0);
     $user_notification = get_setting_value($user_profile, "user_notification", 0);
     $admin_sms = get_setting_value($user_profile, "admin_sms_notification", 0);
     $user_sms = get_setting_value($user_profile, "user_sms_notification", 0);
     if ($admin_notification || $user_notification || $admin_sms || $user_sms) {
         foreach ($r->parameters as $key => $parameter) {
             $value = $r->get_value_desc($key);
             $t->set_var($key, $value);
         }
         $company_id = "";
         $state_id = 0;
         $country_id = 0;
         $delivery_company_id = "";
         $delivery_state_id = 0;
         $delivery_country_id = 0;
         $sql = " SELECT * FROM " . $table_prefix . "users ";
         if (strlen($user_id)) {
             $sql .= " WHERE user_id=" . $db->tosql($user_id, INTEGER);
         } else {
             $sql .= " WHERE user_id=" . $db->tosql($new_user_id, INTEGER);
         }
         $db->query($sql);