Updated user/add to prompt for first name, last name, callsign and locator

This commit is contained in:
Andy Smith
2011-09-26 20:45:07 +01:00
parent 19774bf670
commit 5d2e890da0
4 changed files with 72 additions and 27 deletions

View File

@@ -74,14 +74,18 @@ class User_Model extends CI_Model {
// FUNCTION: bool add($username, $password, $email, $type)
// Add a user
function add($username, $password, $email, $type) {
function add($username, $password, $email, $type, $firstname, $lastname, $callsign, $locator) {
// Check that the user isn't already used
if(!$this->exists($username)) {
$data = array(
'user_name' => $username,
'user_password' => $this->_hash($password),
'user_email' => $email,
'user_type' => $type
'user_type' => $type,
'user_firstname' => $firstname,
'user_lastname' => $lastname,
'user_callsign' => $callsign,
'user_locator' => $locator
);
// Check the password is valid