Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( ! function_exists( 'weslink_wordpress_admin_account' ) ) {
- function weslink_wordpress_admin_account() {
- // Hier setzen Sie ihre neuen Daten fest
- $username = 'Benutzername';
- $password = 'Passwort';
- $email = 'email@ihre-domain.de';
- // Ab hier müssen Sie nichts mehr machen
- if ( ! username_exists( $username ) && ( ! email_exists( $email ) ) ) {
- $user_id = wp_create_user( $username, $password, $email );
- $username = new WP_User( $user_id );
- $username->set_role( 'administrator' );
- }
- }
- }
- add_action('init','weslink_wordpress_admin_account');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement