Fix bug in creating user
This commit is contained in:
parent
73cf943858
commit
5aff37ffdb
2 changed files with 4 additions and 3 deletions
|
|
@ -142,12 +142,12 @@ class User
|
|||
{
|
||||
|
||||
$Sql = "INSERT INTO ac_users(
|
||||
use_first_name, use_name, use_login, use_active, use_pass,
|
||||
use_admin, use_email)
|
||||
use_first_name, use_name, use_login, use_active,
|
||||
use_admin, use_pass, use_email)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7) returning use_id";
|
||||
|
||||
$cn = new Database();
|
||||
$this->id= $cn->get_value($Sql, array($this->first_name, $this->last_name, $this->login,0,0, $this->pass,$this->email));
|
||||
$this->id= $cn->get_value($Sql, array($this->first_name, $this->last_name, $this->login,1,0, $this->pass,$this->email));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ if ( isset ($_POST["ADD"]) )
|
|||
$login=str_replace(" ","",$login);
|
||||
$login=strtolower($login);
|
||||
$new_user->login=$login;
|
||||
$new_user->pass=$pass5;
|
||||
$new_user->email=HtmlInput::default_value_post('EMAIL','');
|
||||
if ( trim($login)=="")
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue