To change user password in WordPress using MySql you can use the following query.
Sample MySql
UPDATE wp_users SET user_pass = MD5('NewPassword') WHERE user_login = 'UserName';
To change user password in WordPress using MySql you can use the following query.
UPDATE wp_users SET user_pass = MD5('NewPassword') WHERE user_login = 'UserName';
Every default WordPress installation will create an account with a default Admin username. This can be a security issue.
To change default Admin Username in WordPress you can use the mySql snippet below.
UPDATE wp_users SET user_login = 'NewUsername' WHERE user_login = 'Admin';
To list all user defined functions in MSSQL you can use the following snippet.
SELECT name AS function_name, SCHEMA_NAME(schema_id) AS SCHEMA_NAME ,type_desc FROM sys.objects WHERE type_desc LIKE '%FUNCTION%' ORDER BY name asc;
To detect browser in PHP you can use the following snippet.
$userAgent = $_SERVER ['HTTP_USER_AGENT'];
To get the current logged in user in Java you can use the following snippet.
System.getProperty("user.name")
To list all users in MSSQL you can use the following snippet.
select * from sys.sysusers ORDER BY name asc
There is more than one way to get the current username using C# or VB.NET i will show you one using Environment Variable and one using the WindowsIdentity.
If you are in a Network the output of both methods is different.
string currUsername = Environment.UserName;
Dim currUsername As String = Environment.UserName
string currUsername = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
Dim currUsername As String = System.Security.Principal.WindowsIdentity.GetCurrent().Name
1 |
<span class="str">using the Environment Variable: <strong>Username</strong></span> |
1 |
<span class="str">using the WindowsIdentity: <strong>Domainname\Username</strong></span> |
Tip
if you want to use the Environment variables and want to get the Domainname also, take a look at Environment.UserDomainName Property
for more informations take a look at the MSDN: Environment.UserName, WindowsIdentity Class