Last Login Prompt

  • Last update:December 25, 2025
  • Overview

    Version

    Report Server Version

    11.0

    Function Description

    For security reasons, you can enable Last Login Prompt under System Management > System Setting > Login on the decision-making platform. In this way, the time, IP address, and location of the previous login will be displayed each time you log in, helping you promptly identify abnormal login activity.

    Procedure

    Enabling Last Login Prompt

    Log in to the decision-making platform as the admin, choose System Management > System Setting > Login > Last Login Prompt Configuration, and enable Last Login Prompt, as shown in the following figure.

    Effect Preview

    PC

    After you log in to the decision-making platform, the system will display the last login information, as shown in the following figure.

    Mobile Terminal

    The following figure shows the effect in the DataAnalyst app.

    Customizing the Login Page to Display Last Login Information

    The system retrieves the login information from the login page.

    iconNote: 
    You can use the addLoginInfo(function ()) function to save the login information.

    Code Description

    1. Get the IP address and location of the current client.

    // Get the IP address and location of the current client. You can replace the data source as needed.
        function getIpInfo(cb) {
          $.ajax({
            url: "https://cloud.fanruan.com/api/query/ip?timeout=10000",
            async: true,
            dataType: "JSONP",
          }).done(function (data) {
            cb(data);
          });
        }

    2. Add login information.

    function addLoginInfo(cb) {
          getIpInfo(function (ipInfo) {
            var info = {
              time: BI.print(BI.getDate(), "%Y-%X-%d %H:%M:%S"), // Login time formatted as yyyy-MM-dd HH:mm:ss
              ip: ipInfo.ip || "",
              city: ipInfo.provincecity || "",
            };
            $.ajax({
              url: "/webroot/decision/login/info",
              contentType: "application/json",
              type: "POST",
              dataType: "json",
              headers: {
                Authorization: "Bearer " + BI.Cache.getCookie("fine_auth_token"),
              },
              data: JSON.stringify(info),
              success: function (res) {
                cb();
              },
              error: function () {
                alert("Timeout or other server error");
              }
            });
          })
        }

    Example

    You can download the HTML file of customized login page: test.html.zip.

    To have the last login information displayed on the login page, you can download the modified file: login.html.zip.

    iconNote: 
    The built-in FineUI framework is used in this example. If FineUI is not used, you can achieve the same function by implementing Ajax requests with jQuery or native JavaScript, while managing cookie setting and retrieval, and setting the current time yourself.

    Notes

    Inaccurate Last Login Information

    Problem:

    The last login information displayed upon login is inaccurate.

    Cause:

    Login information is captured on the login page. If you bypass the login page and directly access the decision-making platform, the current login information will not be recorded and displayed as the last login information upon your next login.

    For example, if you have ticked Keep Logged In on the login page or configured SSO, you can access the decision-making platform directly without entering the login page, which may result in inaccurate last login information.

    Last Login Information Not Displayed

    Problem:

    Last Login Prompt is enabled, but the last login information is not displayed upon login.

    Cause:

    The IP address and location in the login information are obtained from the FanRuan cloud center at https://cloud.fanruan.com/api/query/ip?timeout=10000.

    If the server cannot connect to this URL, the system will fail to retrieve the last login information. However, this does not affect log recording.

    Attachment List


    Theme: Decision-making Platform
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy