Bug 565 - User who has already registered cannot login when the program re-executed
Summary: User who has already registered cannot login when the program re-executed
Status: RESOLVED FIXED
Alias: None
Product: New-Territories-Cycle-Track-Navigation-System
Classification: Unclassified
Component: JsonOperation (show other bugs)
Version: 1.0
Hardware: PC Windows
: High enhancement
Assignee: lst
URL:
Depends on:
Blocks:
 
Reported: 2021-11-16 10:07 HKT by lst
Modified: 2021-11-16 11:05 HKT (History)
0 users

See Also:


Attachments
Registration.png (14.68 KB, image/png)
2021-11-16 10:52 HKT, lst
Details
Login.png (7.70 KB, image/png)
2021-11-16 10:53 HKT, lst
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lst 2021-11-16 10:07:14 HKT

    
Comment 1 lst 2021-11-16 10:52:23 HKT
Created attachment 81 [details]
Registration.png

This picture shows us the process of registration of a new account.
Comment 2 lst 2021-11-16 10:53:42 HKT
Created attachment 82 [details]
Login.png

This picture shows us the error that a registered account cannot be found in the database and cannot login.
Comment 3 lst 2021-11-16 10:59:06 HKT
Steps to reproduce;

Step 1: Register a new account in the system. (See Fig. Registration.png)
Step 2: Log in with that account. (See Fig. Login.png)

Actual result: Login unsuccessfully. The account does not exist. 
Expected result: Login successfully. Show me the MemberControlPanel.
Comment 4 lst 2021-11-16 11:05:23 HKT
Reason:
We use a Database class to store the information of registered members. When the program ends, the Database will be cleared. Therefore, this design does not support users' needs.

Solution:
We upgraded our design. Instead of using Database class, we maintain two JSON files (MemberInfo.json & AdminInfo.json). These two files will always hold the information, then the data will not lose.