The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    1
    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,461
    Likes Received:
    22
    Trophy Points:
    38
    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
     
  3. mlatyshev

    mlatyshev Registered

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

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    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
    
     
  5. mlatyshev

    mlatyshev Registered

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

Share This Page