/** * Vérifie les attributs de l'inscription * @param array $param Les attributs à vérifier * @return object 2 attributs, bool success et array string msg * @static */ private static function checkInscription(&$param) { $std = (object) array('success' => false, 'msg' => array()); $captcha = new Captcha(); if (($res = $captcha->check($param['g-recaptcha-response'])) === true) { if (($res = Membre::checkPseudo($param['pseudo'])) !== true) { $std->msg[] = $res; } if (($res = Membre::checkEmail($param['email'])) !== true) { $std->msg[] = $res; } if (($res = Membre::checkPass($param['password'], $param['passwordConfirm'])) !== true) { $std->msg[] = $res; } if (($res = Membre::checkConditions($param['conditions'])) !== true) { $std->msg[] = $res; } } else { $std->msg[] = $res; } if (empty($std->msg)) { $std->success = true; } return $std; }