-
Posts
120 -
Joined
-
Last visited
-
Days Won
2
WHMCS Peter last won the day on May 20 2020
WHMCS Peter had the most liked content!
About WHMCS Peter

Recent Profile Visitors
WHMCS Peter's Achievements
Senior Member (3/3)
18
Reputation
-
Hey, Unfortunately, I'm unable to allocate time and resources right now to assisting in writing this however, we do have a section in the community where you can request assistance from external development services for things like this. I recommend you check it out: https://whmcs.community/forum/137-service-offers-requests/ Pete.
-
Hello, To achieve this, you would likely need to use one of the CronJob hook points to query tblhosting and client invoices. After you have determined that these are suitable for suspension/termination, you could then use our ModuleSuspend or ModuleTerminate API methods respectively. I hope this helps.
-
Hi @Muhammad Waqas, The /feeds/*.php files are all unencoded and can be altered to your own requirements. By default, this feed does not include any pagination however, you can alter this file to include it. Do bear in mind that any changes to this file will likely be overwritten on update. Instead, copy the file and name this something that isn't currently included in the WHMCS package. This will avoid it being overwritten on update.
-
Changes in SESSION data for logged in users?
WHMCS Peter replied to SwiftModders's topic in Troubleshooting Issues
Hi @SwiftModders LLC, You should ideally not use these directly. Instead, use code like the following: <?php use WHMCS\Authentication\CurrentUser; $userId = null; $clientId = null; $ownsClientAccount = false; // User will return the WHMCS\User\User model if the user is logged in. Otherwise, returns null. $user = CurrentUser::user(); // Client will return the WHMCS\User\Client model if a client is selected/in use. Otherwise, returns null. $client = CurrentUser::client(); if ($user) { $userId = $user->id; } if ($client) { $clientId = $client->id } if ($user && $client) { if ($user->isOwner($client)) { $ownsClientAccount = true; } } There should be no need to utilise the session data. Wherever possible, it's best not to interact directly with WHMCS session variables. -
Changes in SESSION data for logged in users?
WHMCS Peter replied to SwiftModders's topic in Troubleshooting Issues
Hi @DennisHermannsen, This did not work because CurrentUser::client() returned null. This means that no Client was currently logged into by the user. You should ensure that a Client exists first. Give this a try: use WHMCS\Authentication\CurrentUser; add_hook('ClientAreaSecondaryNavbar', 1, function (MenuItem $primaryNavbar) { $user = CurrentUser::user(); $client = CurrentUser::client(); if ($user && $client && $user->isOwner($client)) { // User is logged in, and a Client is present. Run your code. } }); I've added && $client to the conditional. Meaning that if either a User or Client is not present, the code will not run and the isOwner call will not be reached. -
Changes in SESSION data for logged in users?
WHMCS Peter replied to SwiftModders's topic in Troubleshooting Issues
So “Clients” are not “Login-able” entities anymore. Only users have a password for example. What I think you are looking to do is identify the owner, over other authorised parties. Would that be right? If so, you may wish to use CurrentUser::user() to grab the user, and then check the owner like so: <?php use WHMCS\Authentication\CurrentUser; $user = CurrentUser::user(); if ($user && $user->isOwner(CurrentUser::client()) { // logged in as the “owner” of this client account. } -
Changes in SESSION data for logged in users?
WHMCS Peter replied to SwiftModders's topic in Troubleshooting Issues
Hey! isOwner will return true if this user is the owner of the client account. You should use user() to verify a user is logged in, such as: if (CurrentUser::user()) { // I am logged in } See: https://classdocs.whmcs.com/8.0/WHMCS/Authentication/CurrentUser.html -
Changes in SESSION data for logged in users?
WHMCS Peter replied to SwiftModders's topic in Troubleshooting Issues
Hey Dennis! I can confirm that this documentation is due to be available shortly and has been written. Our Documentation has to go through a few stages before it reaches the public domain, but it’s on its way! -
Hey Bear. Intriguing. Could you share your browser and its respective version? Could you also share with me if you see any console errors in the browser developer tools?
-
Hi @ju5t, Here's an SQL query which would allow you to export the affected customers directly from the database, to CSV for upload to a service such as MailChimp for your email blast: SELECT `firstname`, `lastname`, `email` FROM `tblclients` WHERE `id` IN (SELECT `userid` FROM `tblhosting` WHERE `server` = SERVER_ID_HERE AND `domainstatus` IN ('Active', 'Suspended')); Replace SERVER_ID_HERE with the affected server ID from tblservers. You can see this by editing a server too, in the address bar. Use your favourite tool (such as PHPMyAdmin) to export this data to .csv and upload it per MailChimps requirements. Hopefully this is a viable workaround for you.
-
Hi @bear, That's certainly strange! As a test, can you try (or have you tried?) replacing your current "admin" directory with a fresh copy from a new install ZIP at https://download.whmcs.com This will confirm for sure if the issue lies in your template edits or not. If that resolves it, you can start re-applying any changes you had made until it happens again. If it doesn't, let me know which browser you're using and I'll see if I can reproduce any issue. If I can, I'll provide a resolution here.
-
Useless support via priority ticket
WHMCS Peter replied to agentblack's topic in Troubleshooting Issues
Hi there! I'm sorry that you feel you have had a less than optimal experience. I have reviewed your ticket and can see that our Level 2 analysts have been assisting you with your issue. In regards to these errors: PHP Warning: Module 'imap' already loaded in Unknown on line 0 PHP Warning: Module 'mbstring' already loaded in Unknown on line 0 PHP Warning: Module 'soap' already loaded in Unknown on line 0 PHP Warning: Module 'xmlrpc' already loaded in Unknown on line 0 These are caused by a PHP configuration misconfiguration. Not WHMCS. This indicates that you have multiple lines trying to load these modules when they can of course only be loaded once. To resolve this, you would need to reach out to your qualified System Administrator and have them review your PHP configuration. They will be able to provide you with the required help you need in regards to those issues as they are System Configuration issues, not WHMCS issues. We would love to have been more helpful with this issue, but unfortunately, we aren't qualified System Administrators and of course, as you know, every server can be different. This is why having a System Administrator on hand can be useful. In case you don't already have a System Administrator, the cPanel Forums have a useful Sys Admin listing which you may find helpful: https://go.cpanel.net/sysadmin Have a great day! Peter- 1 reply
-
2
-
WHMCS Peter changed their profile photo
-
Hi @J-B, I've just responded to you in your support ticket, #UAS-174768. I have answered all of your questions. For your ideas on how the module could be improved, I would encourage you to please submit a request to our feature requests tracker where other users can contribute to and vote on your idea. Ideas with the most votes and activity do get reviewed by our team. https://requests.whmcs.com/topic/management-function-for-direct-debits-gocardless
-
I need urgent help - "I need reg expression to allow 9 or 10
WHMCS Peter replied to VA VA's topic in Developer Corner
Hi, I have removed your attachment from your original post, deleted your most recent reply and added the code in a codeblock in your original post. Please do provide code-snippets, rather than attachments as many people will not trust the authenticity of them. At this time, WHMCS does not support the adding of custom card types due to internal validation server-side. Your code will simply update the client-side validation. There is no way to work around this at this time. I'd recommend opening a Feature Request as I can see how the ability to add support for custom card types would be useful: https://requests.whmcs.com/ -
Hi, The purpose of the single sign on function is to effectively generate a one-time use URL which will allow a user to log in without further authentication. For example, your function would return https://service.yourdomain.com/sso?user=SOME_USERNAME&accesstoken=A_RANDOM_GENERATED_HASH WHMCS will redirect the user to your service using this URL. Your service would then analyze the URL and perform a login based on the information in the URL without asking for a username and password and then invalid that URL from further use. Unfortunately, we can't provide assistance with generating a single sign-on URL for your custom service. This will likely involve knowledge of your custom service and also, new functionality to generate single sign-on URLs if this is not already present.
