View Single Post
Old 9th December 2011, 02:30
Typhon Typhon is offline
Join Date: Dec 2011
Posts: 78
Thanks: 27
Thanked 4 Times in 3 Posts

Dude, you haven't told us anything about what you're attempting to do relative to "creating a user" or where you're doing it. Are you modifying the ISPConfig code? Are you attempting to create your own plug-in/module? It's hard for us to help when you're so vague.
No, i have created a DB user who have access to ISPC database, i create a query who permit me to add client, the complete page :

PHP Code:
// PDO con….

function crypt_password($cleartext_password) {
        for (
$n=0;$n<8;$n++) {

$username $_POST['username'];
$password crypt_password($_POST['password']);
$query=$db->prepare('INSERT INTO  client(username, password)
        VALUES (:username, :password)'
$query->execute()){echo 'yes';}

        <h6 class="commentsTitle"><span>Add client</span></h6>
        <form class="addComment" action="" method="post">
            <input type="text" name="username" class="" value="client..." title="client..." />
            <input type="password" name="password" title="password..." />
            <input type="submit" name="flag" class="submit" value="Add !" />
Till built ISPConfig; he's qualified to address your questions. He also gave you a code-snippet that is copy-paste-ready and demonstrates the procedure for creating a password with the crypt-md5 algorithm.
yeah i know but it's doesn't work, Im don't qualified
Also, you do realize that the entire ISPConfig code-base is available to the public, right
That's why i choose it ;o)

Finally, ISPConfig has a complete API for doing things like creating new users. The newest version is very well-documented. Research it.
For the moment, the API can create only FTP users…but not client ?
Thank you very much Till and cbj4074

Last edited by Typhon; 9th December 2011 at 02:34.
Reply With Quote