Fred - 2013-03-16 20:55:03 - In reply to message 2 from Jorge Prado
Ok, the code is no more giving back an error, but the app says 'El usuario no existe' as the credentials are well in the table I check as 'Es seguridad'.
Passwords are coded with the mysql password function, I hope this is the right method...
This made me wonder about the request that could have been processed and add log in datamanager->consulta, then I see you don't try using the password crypted value. So, it could be a good idea, anyway, I must choose another solution for this time as I am too short in time. I will try it again later as I find it promising. It will be still more interesting if you extrat all labels in a config file (using something like $_LABELS['page.labelkey'] in the code). This will allow a rapid localization (I'm french for instance and if I can manage foreing words in the code, it's not the case of final users...).
Jorge Prado - 2013-03-17 03:11:44 - In reply to message 3 from Fred
if I understand you use a function in MySQL to encrypt password field in the table then the alternative would encrypt the string entered by the user using the DataManager.
This would be the login.php file with the modification to work as you need.
$usuario = $_POST["user"];
$clave = $_POST["clave"];
$objsecur = $dc->tablas[$GLOBALS["tablasecur"]];
//USING GLOBAL OBJECT CONNECTION
//convert the entered password to an encrypted string that is returned by
//mysql, md5 put only for example, but it is not
//recommended to use md5 and that use Windows as OS and I can not use the
//mysql funcion ENCRIPT()
$cript_password =$objDataManager->fetch_array($objDataManager->consulta("SELECT md5(\"".$clave."\")"));