// Context part 31
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8087 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+4
-4
@@ -74,20 +74,20 @@ if (Tools::isSubmit('Submit'))
|
||||
{
|
||||
/* Seeking for employee */
|
||||
$employee = new Employee();
|
||||
$employee = $employee->getByemail($email, $passwd);
|
||||
if (!$employee)
|
||||
if (!$employee->getByemail($email, $passwd))
|
||||
{
|
||||
$errors[] = Tools::displayError('Employee does not exist or password is incorrect.');
|
||||
$cookie->logout();
|
||||
$employee->logout();
|
||||
}
|
||||
else
|
||||
{
|
||||
$employee->remote_addr = ip2long(Tools::getRemoteAddr());
|
||||
/* Creating cookie */
|
||||
$cookie->id_employee = $employee->id;
|
||||
$cookie->email = $employee->email;
|
||||
$cookie->profile = $employee->id_profile;
|
||||
$cookie->passwd = $employee->passwd;
|
||||
$cookie->remote_addr = ip2long(Tools::getRemoteAddr());
|
||||
$cookie->remote_addr = $employee->remote_addr;
|
||||
$cookie->write();
|
||||
/* Redirect to admin panel */
|
||||
if (isset($_GET['redirect']))
|
||||
|
||||
Reference in New Issue
Block a user