View Single Post
  #13  
Old 8th December 2011, 12:02
Typhon Typhon is offline
Member
 
Join Date: Dec 2011
Posts: 78
Thanks: 27
Thanked 4 Times in 3 Posts
Default

Quote:
How are you creating your new users? With the ISPConfig API
I insert user with PDO :
Quote:
Originally Posted by Typhon View Post
I did not understand, I do not know the key-based logins and password-based SSH logins
I have an other problem, i try to add a user
PHP Code:
        $username $_POST['username'];
        
$password crypt($_POST['password']);
        
        
$query=$db->prepare('INSERT INTO  client(username, password)
        VALUES (:username, :password)'
);
        
$query->bindValue(':username'$usernamePDO::PARAM_STR);
        
$query->bindValue(':password'$passwordPDO::PARAM_STR);
        if(
$query->execute()){echo 'yes';}
        
$query->CloseCursor(); 
The user is created in the DB but i can't use it for connection, i have this message when i try to login in ISPC :
ERROR

Error
Username or Password wrong.
I think that there are a problem with the password hashing, we must use cryt, no ?

EDIT :Even if i change the password from my admin account i cannot connectů.
For information, i have give in the DB ONLY the username and the password
Reply With Quote