Web App User Manager

This is a basic user manager for web apps. It's a stand-alone website that verifies user information and then redirects back to the main app. This allows you to focus on web apps themselves instead of the user verification system. It's written in HTML, JavaScript, and PHP.



The user manager is a stand alone page on the site. Each web app checks to see if it was passed a user code. If it was, it makes a quick API call to verify that the code is valid. If the code doesn't exist or is not valid it simply re-directs the user to the user manager which takes care of the login process.


  1. Extract the files into their own directory.
  2. Manually create the database using install.mysql.
  3. Edit the database details (4 lines) at the top of model.php.
  4. Edit the paths (3 lines) in the __construct function in /api/user.php.


I've built the user manager so that it's very easy to use. In each app I include only one line of code.

include '../user/api/user.php';

The user.php script will automatically verify the user value passed to the current script and re-direct the user as needed.

Verify User API

Normally, your web app will pass the user id (hash) code to the verify script to make sure that it's a valid id. Here's an example of passing a hash code.


If you want to verify username and password in the web app itself you can also pass those to the verify script. Here's an example of passing username and password.


In either case, the script will return either the user id, on success, or the word error if it could not be verified.


This source code is distributed under the MIT License.


comments powered by Disqus
web_app_user_manager.txt · Last modified: 2020/06/01 22:53 (external edit)