All posts tagged “reset

comment 0

Create WordPress admin user with sql only

If you don’t have access to you WordPress website anymore, but still can update the MySQL database. You can easily add a new admin user with this sql script:

USE <database>;
SET @username = '<username>';
SET @password = MD5('<password>');
SET @fullname = '<Firstname Lastname>';
SET @email = '<>';
SET @url = '<>';
INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_status`, `display_name`) VALUES (@username, @password, @fullname, @email, @url, NOW(), '0', @fullname);
SET @userid = LAST_INSERT_ID();
INSERT INTO `wp_usermeta` (`user_id`, `meta_key`, `meta_value`) VALUES (@userid, 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `wp_usermeta` (`user_id`, `meta_key`, `meta_value`) VALUES (@userid, 'wp_user_level', '10');

Get the latest version of this snippet here:

comment 0

Handling user password change and expiration issues with Office365 and ADFS – Part 2

This is part two of my experience in handling the password change office365 architecture issue.

Last time I’ve built a simple script  to notificate the users about the status of their passwords. In the mean time we (me and another employ of the “vbl Informatik”) built a simple website for the office365 users to change their password.

Read More