Change All Accounts From Retro to Paper Lantern?
Hello
There is a way to massively change all the accounts with Retro Paper Lantern style in order to use the Basic Paper Lantern style?
I've tried to change only the symbolic link on
/home/user/var/cpanel/styled/
from: /usr/local/cpanel/base/frontend/paper_lantern/styled/retro/ to /usr/local/cpanel/base/frontend/paper_lantern/styled/basic/
But the loaded style is a mixed "retro style" with "basic style" colors.
Thanks in advance.
-
Hello, The following thread should help: Paper Lantern theme isn't working at all Thank you. 0 -
Hello, You may find the following UAPI function more helpful for this action: UAPI Functions - Styles::update - Software Development Kit - cPanel Documentation EX: uapi --user=username Styles update type=default name=basic
This will set the default style for a cPanel account, and you could setup a loop that runs the command for all users on the system. Note that internal case DOC-6231 is open to update0 -
Hello, and thanks for your reply. Unfortunately I get an error doing that. I have of course replaced "username" with a real customer. We have no re sellers in our system. apiversion: 3 func: set_default module: Styles result: data: ~ errors: - username should be a reseller to set default style messages: ~ metadata: {} EDIT: Solved. I poked around that UAPI call and found that "update" and not "set_default" works. The server is running through 1000+ accounts now. Thank you very much., 4 more to go. Here is my step by step, the account list is a bit clunky. 1- Run: whmapi1 listaccts searchtype=user > accounts.txt 2 - Run: grep -i 'user:' accounts.txt > account_usernames.txt 3 - Search and replace the blank spaces & user: to nothing, leaving only usernames. 4- Run the code: #! /bin/sh while IFS= read -r uname do uapi --user=$uname Styles update type=default name=basic done < "account_usernames.txt"
This will fix any themes stuck in RETRO and skip any already on BASIC. The only drawback is for any accounts that are "broken" like in my screenshot above that have been switched to BASIC earlier through a broken method are not fixed. They still need to manually be set to BASIC or reverted back to RETRO then have the script run again. Now if only I knew the Location of resetpass-email.tmpl?0
Please sign in to leave a comment.
Comments
5 comments