Guest user

Release 1.0 - ...

This script adds the new Guest user to the Users table.

Property Value
FullName Guest
Loginname Guest
Password Guest

SQL CopyCode image Copy Code
IF NOT EXISTS (SELECT 1 FROM Visitors WHERE Loginname='Guest')
BEGIN
   PRINT 'Adding Guest user.'
 
   DECLARE @nrgroup int
   SELECT @nrgroup= Nr FROM UserGroups WHERE Name='Site Visitors'
   IF (@nrgroup IS NOT NULL) SELECT TOP 1 @nrgroup=Nr FROM UserGroups WHERE Parent IS NULL
 
   INSERT INTO Visitors (Loginname,Password,Fullname, PrimaryGroupId) 
   VALUES ('Guest','Guest','Guest', @nrgroup)
END