Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to place a hook after some account transfer from other cPanel server?

Discussion in 'cPanel Developers' started by mlatyshev, Feb 25, 2011.

  1. mlatyshev

    mlatyshev Registered

    Joined:
    Feb 25, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    51
    Hello,

    I need to place some hook after account transfer from other cPanel server. Is there any possibility to do this? I can't find anything about hooks in transferring in documenttion.
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,570
    Likes Received:
    45
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    At what point in the process do you want the hook to execute? Some example events that come to mind:

    • After the physical copy, but before account creation
    • After account creation
    • After account is fully transferred
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. mlatyshev

    mlatyshev Registered

    Joined:
    Feb 25, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    51
    I think "After account is fully transferred" would be the best.
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,570
    Likes Received:
    45
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    Then you'll want to use /scripts/postrestoreacct which is passed the following position-dependent arguments:

    Code:
    $user, $olduser, $domain, $user_homedir
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. mlatyshev

    mlatyshev Registered

    Joined:
    Feb 25, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    51
    Thanks a lot!
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice