Skip to main content

Change All Accounts From Retro to Paper Lantern?

Comments

5 comments

  • cPanelMichael
    Hello, The following thread should help: Paper Lantern theme isn't working at all Thank you.
    0
  • domeneas
    The solution to that thread, running "rm -rf /home/*/var/cpanel/styled" gives the same effect as described in the initial post here and as following the command line documentation here:
    0
  • cPanelMichael
    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 update
    0
  • domeneas
    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
  • cPanelMichael
    Hello, I'm happy to see the issue is now resolved. Thank you for taking the time to provide us with the steps you used to address the issue. I've updated the command in my earlier response to reflect the use of the "Styles::Update" UAPI function, documented at:
    0

Please sign in to leave a comment.