Check if the current user landed

xiaoxiao2021-03-06  15

Check if the current user landed

Using system.security.principal;

This.page.user.Identity.isauthenticated;

Change Password:

String oldpsw, newpsw; string username = this.page.user.Identity.Name; username = username.remove (0, username.lastindexof ('//') 1);

DirectoryEntry User = New DirectoryEntry ("Winnt: //./" UserName); OldPsw = txtoldpsd.Value; newpsw = txtnewpsd.value;

Try {user.invoke ("changePassword", new object [] {oldpsw, newpsw}); this.lblMessage.text = "Successfully modified password"} catch {this.lblMessage.text = "Modify password failed"};

转载请注明原文地址:https://www.9cbs.com/read-46818.html

New Post(0)