Hello. I am trying to develop a login system based on email accounts in ISPConfig 3. I've found the API of ISPConfig, but I couldn't find verification of email login. I saw the example with function mail_user_get, but it requires mailuser_id, not email and password. Please give me some advice.
The "get" functions can get an array instead of the id. Like array('login' => 'myusername') then you can check the crypted password of the result.
Ok, I see this is nice. I get the user details, but how do I encode the password input so I can compare it to the email password from the database? Can you please give me an example code. Thanks!
PHP: // this is the one from the dataset you got via api$saved_password = stripslashes($mailuser['password']);$salt = '$1$'.substr($saved_password, 3, 8).'$';// this is the one you want to check$password = crypt(stripslashes($login_password), $salt);if($password == $saved_password) -> everything should be ok