Comments (10)
They have been sent.
from wp-ispconfig3.
The UpdClient function is used in the example cancelled method, and can also be used for switching master templates, updating passwords, limits, etc. Maybe utilize it on a form (for logged in users) that either creates or updates the ISPConfig user account by the same name as the WordPress username, depending on whether or not the user already exists. I would recommend providing this function only when a username is gathered automatically to avoid an existing user from being updated by someone else. I assume you’re turning this into some kind of form builder? I’m unable to look at the code presently, but if that is correct, then I recommend only utilizing that function when the username field does not exist in the form. I will look at the branch later today.
from wp-ispconfig3.
To update (or manage) ISPconfig users based on their wordpress login I was more thinking of a small plugin, the developer can create for each action individually
Currently wp-blocks branch supports the following actions (but this may change):
- ispconfig_block_action_create_client
- ispconfig_block_action_create_website
- ispconfig_block_action_create_website_new
- ispconfig_block_action_update_client
Below would be a working example plugin
<?php
/*
Plugin Name: Ispconfig client2user
Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
Description: Always overwrite the ISPConfig client id to its logged in wp_user.
Version: 1.0
Author: ole1986
License: GPL2
*/
add_filter('ispconfig_block_action_update_client', function($fields) {
$user = wp_get_current_user();
array_walk($fields, function(&$item) use($user) {
if($item['id'] == 'client_username') $item['value'] = $user->user_login;
});
return $fields;
});
This will overwrite the "action" known as "Update client" (may change in future) to always use the logged in account.
There will be other actions available of course (E.g. "Update bank details") which can easily be included through the add_filter
callback.
And even more, it could overwrite the default values (being set by the gutenberg block) from different sources.
from wp-ispconfig3.
@MachineITSvcs I have updated the wp-blocks branch so, that I could actually get rid of the shortcodes (including the "canceled" one).
It would be really helpful you can test it and let me know what you think about it.
Please note that this is still not release and errors/problems may occur.
Thank you in advanced
from wp-ispconfig3.
After re-reading your previous message, I noticed you said you may change the Client Update function in the future to always use the logged in user. How I currently use this function is to detect on web hosting (subscription checkout) if the client already exists and update it if necessary. This also runs on every recurring payment, and the canceled method is used when a payment is failed or subscription canceled. So using the logged in user would not be a good idea, as the username needs to be able to get passed into the function on a backend recurring payment for example.
from wp-ispconfig3.
Well, the action/filter hook can actually be used to overwrite the username and other fields dependent on the action being used.
The only difficulty I see now from your last comment, is that you are using such Shortcodes to immediately call an ISPconfig soap action instead of waiting for a user input. Is this correct?!
Can you explain how you trigger the shortcode in recurring payments
from wp-ispconfig3.
That is correct. This is how I’ve always done it, but I also have another custom method besides canceled for this purpose. Would you like me to include both here as examples? They are fairly basic.
from wp-ispconfig3.
I would prefer to email you the code actually
from wp-ispconfig3.
I have improved the use of custom shortcode classes, allowing you to put the files outside of the wp-ispconfig3 plugin.
Check out this wiki page on how to upgrade and implement for version 1.4.0
from wp-ispconfig3.
@MachineITSvcs I am planning to release this version soon. Does the changes fit to your needs?
from wp-ispconfig3.
Related Issues (20)
- Provide a proper ''email' field using WPISPConfig3::getField HOT 1
- Plugin Woocommerce HOT 3
- Hidden Field
- Error with the function WC_Product_Webspace HOT 10
- Filter wordpress users in Websites/Databases other than "customer" role HOT 1
- Translations not working HOT 4
- FR - Support the whole workflow for website creating HOT 3
- Check for domain availability only in ISPConfig HOT 5
- Integrate wizard options into WP-ISPConfig Blocks HOT 5
- Disable whois entirely HOT 3
- Translations for Blocks when using from backend
- Syncronize wordpress user password matching the user roles
- The domain is already registered HOT 10
- Improve global domain check validation using `dig` instead of `whois` HOT 12
- 'Enable password syncronization' does not appear to be working HOT 2
- Username creation or extra field on Check-out HOT 1
- Failed to create wp user HOT 14
- The given username already exists in the other system HOT 3
- Capability issue HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wp-ispconfig3.