static function addException($_objectId, $_userId) { return Db::createLastID("INSERT INTO RightExceptions\n (RightExceptionUser, RightExceptionObject)\n VALUES (?, ?)", array($_userId, $_objectId)); }
static function addFamilyOwner($_email, $_phone, $_firstName, $_lastName, $_hash, $_salt) { //Le contrôleur est en charge de vérifié si le nom d'utilisateur est déjà existant $userId = Db::createLastID("INSERT INTO Users (UserName,UserHash,UserSalt)\n VALUES (?,?,?)", array($_email, $_hash, $_salt)); $infoId = Db::createLastID("INSERT INTO UserInfos (UserInfoFirstName,UserInfoLastName,UserInfoTel,UserInfoFamilyOwner,UserInfoIsMod,UserInfoStatus)\n VALUES (?,?,?,?,1,0) ", array($_firstName, $_lastName, $_phone, $userId)); Db::execute("UPDATE Users\n SET UserInfo = ?\n WHERE UserId = ?", array($infoId, $userId)); return $userId; }