/// <summary>
 /// Updates a user in the database.
 /// </summary>
 /// <returns><c>true</c>, if user was updated, <c>false</c> otherwise.</returns>
 /// <param name="username">Username.</param>
 /// <param name="password">Password.</param>
 public static bool UpdateUser(string username, string password)
 {
     using (var bl = Storage.GetBuilder(SQLSafeName))
     {
         var hs = AuthenticatedUsers.Hash(username, password);
         bl.Update(UserTable.TableName, new DataParameter[]
         {
             new DataParameter(UserTable.ColumnNames.Password, hs)
         },
                   new WhereFilter(UserTable.ColumnNames.Username, username)
                   );
         return(Storage.ExecuteNonQuery(bl) > 0);
     }
 }
 /// <summary>
 /// Creates a user.
 /// </summary>
 /// <returns><c>true</c>, if user was created, <c>false</c> otherwise.</returns>
 /// <param name="username">Username.</param>
 /// <param name="password">Password.</param>
 /// <param name="op">If set to <c>true</c> op.</param>
 public static bool CreateUser(string username, string password, bool op = false)
 {
     using (var bl = Storage.GetBuilder(SQLSafeName))
     {
         var hs = AuthenticatedUsers.Hash(username, password);
         bl.InsertInto(UserTable.TableName, new DataParameter[]
         {
             new DataParameter(UserTable.ColumnNames.Username, username),
             new DataParameter(UserTable.ColumnNames.Password, hs),
             new DataParameter(UserTable.ColumnNames.IsOperator, op),
             new DataParameter(UserTable.ColumnNames.DateAdded, DateTime.Now)
         });
         return(Storage.ExecuteNonQuery(bl) > 0);
     }
 }