Right now, the user profile works by storing a "currentPuzzle" for each user. When that user logs in, it goes to that puzzle, and whenever a user solves a puzzle, it stores the index of the next puzzle as the currentPuzzle.
But this means that if a user wants to jump around, you lose track of which puzzles her has solved.
Instead, the database should have entries for each puzzle that the user solved (and in the future, also stats about how many tries, how long it took to solve, etc), and then you can jump to the first unsolved puzzle.
Right now, the user profile works by storing a "currentPuzzle" for each user. When that user logs in, it goes to that puzzle, and whenever a user solves a puzzle, it stores the index of the next puzzle as the currentPuzzle.
But this means that if a user wants to jump around, you lose track of which puzzles her has solved.
Instead, the database should have entries for each puzzle that the user solved (and in the future, also stats about how many tries, how long it took to solve, etc), and then you can jump to the first unsolved puzzle.