Changeset 98 for trunk/Modules/User/UUserControlPage.pas
- Timestamp:
- Oct 2, 2012, 12:24:00 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/UUserControlPage.pas
r91 r98 93 93 Form.Load(HandlerData.Request.Post); 94 94 with THtmlString(SubItems.AddNew(THtmlString.Create)) do 95 Text := 'Přihlášení u ser: ' + TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value;95 Text := 'Přihlášení uživatele: ' + TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value; 96 96 UserId := User.GetIdByNamePassword(TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value, 97 97 TQueryFormGroup(Form.Groups[0]).Rows.FindByName('Password').Value.Value); 98 UserOnline.Login(UserId); 98 if UserId = -1 then begin 99 with THtmlString(SubItems.AddNew(THtmlString.Create)) do 100 Text := '<br/>Chybné jméno nebo heslo'; 101 end else UserOnline.Login(UserId); 99 102 Form.Free; 100 103 end else … … 157 160 UserId := User.GetIdByNamePassword(TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value, 158 161 TQueryFormGroup(Form.Groups[0]).Rows.FindByName('Password').Value.Value); 159 UserOnline.Login(UserId);162 if UserId <> -1 then UserOnline.Login(UserId); 160 163 Form.Free; 161 164 end else SubItems.AddNew(Form); … … 188 191 Hint := 'Zadejte vaše přihlašovací jméno'; 189 192 Required := True; 193 Value.Value := User.Name; 190 194 end; 191 195 with AddNewItem do begin … … 202 206 Required := True; 203 207 ItemType := fitText; 208 Value.Value := User.Email; 204 209 end; 205 210 with AddNewItem do begin … … 209 214 Required := False; 210 215 ItemType := fitText; 216 Value.Value := User.FullName; 211 217 end; 212 218 end; … … 221 227 with THtmlString(SubItems.AddNew(THtmlString.Create)) do 222 228 Text := 'Profil uživatele: ' + TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value + ' uložen'; 229 User.Name := TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value; 230 User.FullName := TQueryFormGroup(Form.Groups[0]).Rows.FindByName('FullName').Value.Value; 231 User.Email := TQueryFormGroup(Form.Groups[0]).Rows.FindByName('Email').Value.Value; 232 User.Save; 223 233 Form.Free; 224 234 end else SubItems.AddNew(Form);
Note:
See TracChangeset
for help on using the changeset viewer.