diff --git a/AssemblyVersion.cs b/AssemblyVersion.cs index 2b30435..3af925a 100644 --- a/AssemblyVersion.cs +++ b/AssemblyVersion.cs @@ -16,5 +16,5 @@ using System.Reflection; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("3.0.2.511")] -[assembly: AssemblyFileVersion("3.0.2.511")] +[assembly: AssemblyVersion("3.0.2.512")] +[assembly: AssemblyFileVersion("3.0.2.512")] diff --git a/Core/Users.cs b/Core/Users.cs index 4243b3e..5f0b6e1 100644 --- a/Core/Users.cs +++ b/Core/Users.cs @@ -88,6 +88,8 @@ namespace ScrewTurn.Wiki { /// The username. /// The user, or null. public static UserInfo FindUser(string username) { + if(string.IsNullOrEmpty(username)) return null; + if(username == "admin") return GetAdministratorAccount(); // Try default provider first @@ -545,10 +547,11 @@ namespace ScrewTurn.Wiki { /// A value indicating whether to open the link in a new window. /// The User link. public static string UserLink(string username, bool newWindow) { + if(string.IsNullOrEmpty(username)) return "???"; + if(username != null && (username.EndsWith("+" + Log.SystemUsername) || username == Log.SystemUsername)) return username; UserInfo u = FindUser(username); - if(u == null && username.Equals("admin")) u = new UserInfo("admin", null, Settings.ContactEmail, true, DateTime.Now, null); if(u != null) { return @"