+
+ wp_users = meta.tables["wp_users"]
+ hashed_pass = hashlib.md5(options.admin_password).hexdigest()
+ wp_users.update().where(wp_users.c.ID == 1).values(user_login=options.admin_name,user_nicename=options.admin_name,display_name=options.admin_name,user_pass=hashed_pass).execute()
+ wp_usermeta = meta.tables["wp_usermeta"]
+ wp_usermeta.delete().where(wp_usermeta.c.user_id==1 and wp_usermeta.c.meta_key == "default_password_nag").execute()
+
+ # now we can restore the wp_mail function in wp-includes/pluggable[-functions].php
+ pluggable_file = open(pluggable_path,'w')
+ pluggable_file.write(pluggable)
+ pluggable_file.close()
+
+ php.ini_replace_vars()