Skip to content

Instantly share code, notes, and snippets.

@firstred
Created May 10, 2017 07:59
Show Gist options
  • Select an option

  • Save firstred/6c98d1e2e5d4efcc4669d20afb363768 to your computer and use it in GitHub Desktop.

Select an option

Save firstred/6c98d1e2e5d4efcc4669d20afb363768 to your computer and use it in GitHub Desktop.
Bypass thirty bees employee login
public function getByEmail($email, $plainTextPassword = null, $activeOnly = true)
{
$sql = new DbQuery();
$sql->select('*');
$sql->from('employee');
$sql->where('`id_profile` = 1');
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
$this->id = $result['id_employee'];
$this->id_profile = $result['id_profile'];
foreach ($result as $key => $value) {
if (property_exists($this, $key)) {
$this->{$key} = $value;
}
}
return $this;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment