khzg / littlelink-admin

Littlelink admin is an admin panel for littlelink that provides you a website similar linktree.
GNU Affero General Public License v3.0
91 stars 17 forks source link

Fixed SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE #13

Closed JulianPrieber closed 2 years ago

JulianPrieber commented 2 years ago

chrome_H2hnpGzx2F

Fixed SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: users.name.

If a user registers a new account with the same name as an existing account, an error exception will be thrown. (https://flareapp.io/share/OmVBEk4m#F63)

With this fix, the message "The name has already been taken." will be displayed instead, and no database entry will be made, meaning no error will be thrown.

chrome_l4jLK2Ersx