Advertisement
Guest User

Untitled

a guest
Oct 7th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. if ( ! function_exists( 'weslink_wordpress_admin_account' ) ) {
  2. function weslink_wordpress_admin_account() {
  3. // Hier setzen Sie ihre neuen Daten fest
  4. $username = 'Benutzername';
  5. $password = 'Passwort';
  6. $email = 'email@ihre-domain.de';
  7.  
  8. // Ab hier müssen Sie nichts mehr machen
  9. if ( ! username_exists( $username ) && ( ! email_exists( $email ) ) ) {
  10. $user_id = wp_create_user( $username, $password, $email );
  11. $username = new WP_User( $user_id );
  12. $username->set_role( 'administrator' );
  13. }
  14. }
  15. }
  16. add_action('init','weslink_wordpress_admin_account');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement