I assume you mean hotspot users.
Yes, it's possible, but how easy it is depends on your topology.
On successful authentication with your database, you'll need to create a temporary hotspot user with the API using the "/ip hotspot user add" command, then call the "/ip hotspot active login" command to then bind that user to the internal IP address of the device the user is on. Ideally, you want to add an "on-logout" script at their profile that will remove the user from hotspot as soon as they log out.
If your router is in the same network as your web server, your web server will just know the IP address. If the router has a public IP, but your web server is not in the same network, you'll need to lookup the "/ip firewall connections" menu for their connection to your web server. Your server can tell you the IP and port the client is using at the router, which is enough to uniquely identify them in there, and from there, you'll get their private IP.
If your router does not have a public IP (i.e. you have a "double NAT" situation), and your web server is outside of the network, you'll need to setup a VPN between the router and web server, and then proceed to use the VPN IP as if it's a public one AND make sure users enter your web page through the VPN connection (so that you can look them up in the "/ip firewall connections").
(1.0.0b6) - My API client in PHP
(Rate my posts? If you want... no pressure...)