diff --git a/htdocs/core/login/functions_dolibarr.php b/htdocs/core/login/functions_dolibarr.php index 74da1f97ff0..36596165191 100644 --- a/htdocs/core/login/functions_dolibarr.php +++ b/htdocs/core/login/functions_dolibarr.php @@ -1,6 +1,6 @@ - * Copyright (C) 2007-2009 Regis Houssin +/* Copyright (C) 2007-2015 Laurent Destailleur + * Copyright (C) 2007-2015 Regis Houssin * Copyright (C) 2010-2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify @@ -58,6 +58,7 @@ function check_user_password_dolibarr($usertotest,$passwordtotest,$entitytotest= $sql.=' WHERE ('.$usernamecol1." = '".$db->escape($usertotest)."'"; if (preg_match('/@/',$usertotest)) $sql.=' OR '.$usernamecol2." = '".$db->escape($usertotest)."'"; $sql.=') AND '.$entitycol." IN (0," . ($entity ? $entity : 1) . ")"; + $sql.=' AND statut = 1'; $resql=$db->query($sql); if ($resql)