예제 #1
0
파일: user.php 프로젝트: NoxNode/gamesite
 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";
 }