Fix: check the user status during authentication
This commit is contained in:
parent
cb0b0fba7c
commit
131c3fcef8
@ -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
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user