Support for newuserapp.mpx new user application replacement via MPL program
This commit is contained in:
parent
3f127a8625
commit
db3546092c
|
@ -32,6 +32,7 @@ Type
|
||||||
Constructor Create (Var Owner: Pointer);
|
Constructor Create (Var Owner: Pointer);
|
||||||
Destructor Destroy; Override;
|
Destructor Destroy; Override;
|
||||||
|
|
||||||
|
Procedure InitializeUserData;
|
||||||
Function IsThisUser (Str: String) : Boolean;
|
Function IsThisUser (Str: String) : Boolean;
|
||||||
Function Access (Str: String) : Boolean;
|
Function Access (Str: String) : Boolean;
|
||||||
Function SearchUser (Var Str : String; Real : Boolean) : Boolean;
|
Function SearchUser (Var Str : String; Real : Boolean) : Boolean;
|
||||||
|
@ -76,19 +77,31 @@ Uses
|
||||||
|
|
||||||
Constructor TBBSUser.Create (Var Owner: Pointer);
|
Constructor TBBSUser.Create (Var Owner: Pointer);
|
||||||
Begin
|
Begin
|
||||||
FillChar(ThisUser, SizeOf(ThisUser), #0);
|
InitializeUserData;
|
||||||
|
End;
|
||||||
|
|
||||||
|
Destructor TBBSUser.Destroy;
|
||||||
|
Begin
|
||||||
|
Inherited Destroy;
|
||||||
|
End;
|
||||||
|
|
||||||
|
Procedure TBBSUser.InitializeUserData;
|
||||||
|
Begin
|
||||||
|
FillChar (ThisUser, SizeOf(ThisUser), #0);
|
||||||
|
FillChar (Security, SizeOf(Security), #0);
|
||||||
|
|
||||||
UserNum := -1;
|
UserNum := -1;
|
||||||
ThisUser.ScreenSize := Config.DefScreenSize;
|
ThisUser.ScreenSize := Config.DefScreenSize;
|
||||||
|
ThisUser.Theme := Config.DefThemeFile;
|
||||||
ThisUser.DateType := 1;
|
ThisUser.DateType := 1;
|
||||||
ThisUser.Security := 255;
|
|
||||||
ThisUser.HotKeys := True;
|
ThisUser.HotKeys := True;
|
||||||
ThisUser.RealName := 'Unknown';
|
ThisUser.RealName := 'Unknown';
|
||||||
ThisUser.Handle := 'Unknown';
|
ThisUser.Handle := ThisUser.RealName;
|
||||||
ThisUser.EditType := 1;
|
ThisUser.EditType := 1;
|
||||||
ThisUser.Birthday := CurDateJulian;
|
ThisUser.Birthday := CurDateJulian;
|
||||||
ThisUser.Gender := 'U';
|
ThisUser.Gender := 'U';
|
||||||
ThisUser.FirstOn := CurDateDos;
|
ThisUser.FirstOn := CurDateDos;
|
||||||
|
ThisUser.TimeLeft := Config.LoginTime;
|
||||||
ThisUser.Archive := Config.qwkArchive;
|
ThisUser.Archive := Config.qwkArchive;
|
||||||
ThisUser.LastFGroup := Config.StartFGroup;
|
ThisUser.LastFGroup := Config.StartFGroup;
|
||||||
ThisUser.LastMGroup := Config.StartMGroup;
|
ThisUser.LastMGroup := Config.StartMGroup;
|
||||||
|
@ -99,11 +112,6 @@ Begin
|
||||||
MatrixOK := False;
|
MatrixOK := False;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Destructor TBBSUser.Destroy;
|
|
||||||
Begin
|
|
||||||
Inherited Destroy;
|
|
||||||
End;
|
|
||||||
|
|
||||||
Function TBBSUser.IsThisUser (Str: String) : Boolean;
|
Function TBBSUser.IsThisUser (Str: String) : Boolean;
|
||||||
Begin
|
Begin
|
||||||
Str := strUpper(Str);
|
Str := strUpper(Str);
|
||||||
|
@ -846,27 +854,26 @@ Begin
|
||||||
|
|
||||||
Session.SystemLog ('NEW USER');
|
Session.SystemLog ('NEW USER');
|
||||||
|
|
||||||
{ make user intialize data function }
|
InitializeUserData;
|
||||||
|
|
||||||
If ExecMPE Then Begin { replace this with apple.mpx once the above is done }
|
Session.io.OutFile ('newuser1', True, 0);
|
||||||
(*
|
|
||||||
If User.ThisUser.RealName = '' Then User.ThisUser.RealName := User.ThisUser.Handle;
|
If ExecuteMPL (NIL, 'newuserapp') > 0 Then Begin
|
||||||
If User.ThisUser.Handle = '' Then User.ThisUser.Handle := User.ThisUser.RealName;
|
If ThisUser.RealName = '' Then ThisUser.RealName := ThisUser.Handle;
|
||||||
|
If ThisUser.Handle = '' Then ThisUser.Handle := ThisUser.RealName;
|
||||||
|
|
||||||
If { Test validity of user data }
|
If { Test validity of user data }
|
||||||
IsUser(User.ThisUser.RealName) or
|
FindUser(ThisUser.RealName, False) or
|
||||||
IsUser(User.ThisUser.Handle) or
|
FindUser(ThisUser.Handle, False) or
|
||||||
(User.ThisUser.Password = '') or
|
(ThisUser.Password = '') or
|
||||||
(User.ThisUser.RealName = '') or
|
(ThisUser.RealName = '') or
|
||||||
(User.ThisUser.Handle = '')
|
(ThisUser.Handle = '')
|
||||||
Then Begin
|
Then Begin
|
||||||
Sysop_Log('"apply.mpx" does not set minimum data elements');
|
Session.SystemLog('newuserapp.mpx does not set minimum data elements');
|
||||||
|
|
||||||
Halt(1);
|
Halt(1);
|
||||||
End;
|
End;
|
||||||
*)
|
|
||||||
End Else Begin
|
End Else Begin
|
||||||
Session.io.OutFile ('newuser1', True, 0);
|
|
||||||
|
|
||||||
If strUpper(DefName) = 'NEW' Then DefName := '';
|
If strUpper(DefName) = 'NEW' Then DefName := '';
|
||||||
|
|
||||||
With Config Do Begin
|
With Config Do Begin
|
||||||
|
|
Loading…
Reference in New Issue