Programatically create user that needs admin aproval
Step1

Not need to follow it compulsary

You don't need any third-party modules. Drupal core has the option to verify the email the user enters, and the option for the administrator user to approve the accounts users create. In Drupal 7, those settings are on /admin/config/people/accounts.


Step2



Once you prepare your $user object and use it on user_save function you have to follow below steps to send the mail.




$userData = user_save($user);
$account = user_load($userData-&gt;uid);
$op = 'register_pending_approval';
$status = _user_mail_notify($op, $account);