$user->username = trim($_POST['username']); $user->password = trim($_POST['password']); // $user->first_name= trim($_POST['first_name']); // $user->last_name = trim($_POST['last_name']); $user->email = trim($_POST['email']); $user->user_type_id = 5; $user->block_user = 0; $user->unread_message = 0; $user->unread_notification = 0; if (isset($_POST['first_name'])) { $user->first_name = trim($_POST['first_name']); } if (isset($_POST['first_name'])) { $user->last_name = trim($_POST['last_name']); } $_POST['nom'] = $user->full_name(); $user->nom = $user->full_name(); if (isset($_POST['id'])) { $user->id = (int) $_POST['id']; } if (isset($_POST['id'])) { if (!isset($_POST['password']) || empty($_POST['password'])) { $user->password = null; } else { $user->password = trim($_POST['password']); unset($password); } } if (!isset($_POST['password']) || empty($_POST['password'])) { $required_field = User::$required_fields; $kamy = "isset password";