The next two scripts that we will be discussing will enable administrators to create a new user, with a password that is auto generated. We will look in detail at how it is done. The new user script This script is responsible for creating the user. A user can only be created by an administrator. This is common practice in any intranet environment. A new employee will usually be assigned a username and password by the systems administrator or someone with equivalent authority. And since we are using this application on the assumption that it is going to be used in an intranet, we are going to follow the same tradition. The password will be auto generated by a function that I've included in the functions file. So the moment this registration script is activated, a seven-character-long password will be generated. This password will then be sent to the user when the administrator finishes creating the user profile. This script is located in the admin section of the application. In the next section you will see the code that makes creating a new user possible.
blog comments powered by Disqus |