public static function setguildmaster($username, $password, $guildname, $username2) { if (User::isValidUser($username, $password)) { if (User::isValidGuildname($guildname)) { if (User::isGuildMaster($username, $guildname)) { if (User::isAUser($username2)) { if (Queries::setValue(Database::$table_guilds, "guildname", $guildname, "guildmaster", $username2)) { return "success"; } return "failed to access database"; } return "username2 isn't a user"; } return "only guildmaster can do this"; } return "invalid guildname"; } return "invalid user"; }