Skip to content

Commit

Permalink
Merge pull request #2920 from hregis/3.7
Browse files Browse the repository at this point in the history
Fix: check the user status during authentication
  • Loading branch information
eldy committed May 29, 2015
2 parents cb0b0fb + 131c3fc commit ab29c59
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions htdocs/core/login/functions_dolibarr.php
@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2007-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007-2009 Regis Houssin <regis.houssin@capnetworks.com>
/* Copyright (C) 2007-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007-2015 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ab29c59

Please sign in to comment.