public static function FromSQLRow($row)
 {
     $user = new User();
     // Generic user info
     $user->ID = $row["id"];
     $user->Name = User::SQLUnEscape($row["Name"]);
     $user->LastLogin = $row["LastLogin"];
     $user->IsActive = $row["IsActive"];
     $user->IsGuest = $row["IsGuest"];
     $user->IsRegistered = true;
     // EVE info
     $user->Title = User::SQLUnEscape($row["Title"]);
     $user->CharID = $row["CharID"];
     if (empty($row["Alts"])) {
         $user->Alts = array();
     } else {
         $user->Alts = explode(",", User::SQLUnEscape($row["Alts"]));
     }
     $user->EVERoles = $row["EVERoles"];
     $user->PortalRoles = $row["PortalRoles"];
     $user->IsAlly = $row["IsAlly"];
     $user->CorporationName = User::SQLUnEscape($row["CorporationName"]);
     $user->CorporationTicker = User::SQLUnEscape($row["CorporationTicker"]);
     $user->CorporationID = $row["CorporationID"];
     // Misc
     $user->TimeZone = $row["TimeZone"];
     $user->Email = User::SQLUnEscape($row["EMail"]);
     $user->IM = User::SQLUnEscape($row["IM"]);
     $user->BirthDate = $row["BirthDate"];
     $user->Location = User::SQLUnEscape($row["Location"]);
     // Portal preferences
     $user->DateFormat = $row["DateFormat"];
     $user->PortalSettings = $row["PortalSettings"];
     $user->Signature = User::SQLUnEscape($row["Signature"]);
     // OOP
     $user->OOPUntil = $row["OOPUntil"];
     $user->OOPNote = User::SQLUnEscape($row["OOPNote"]);
     $user->IsOOP = $user->OOPUntil == "0000-00-00" ? false : true;
     return $user;
 }