Example #1
0
 /**
  * Check customer informations and return customer validity
  *
  * @since 1.5.0
  * @param boolean $with_guest
  * @return boolean customer validity
  */
 public function isLogged($with_guest = false)
 {
     if (!$with_guest && $this->is_guest == 1) {
         return false;
     }
     /* Customer is valid only if it can be load and if object password is the same as database one */
     if ($this->logged == 1 && $this->customer_id && JeproshopValidator::isUnsignedInt($this->customer_id) && JeproshopCustomerModelCustomer::checkPassword($this->customer_id, $this->passwd)) {
         return true;
     }
     return false;
 }