Profile Rejection on Registration

Hi,

 

I'm looking for a solution where I can do the following: when a new user registers, I would like to be able to (from the admin panel) reject their registration, and as a result of this have an email automatically be sent. (In a perfect world I would be able to select from a list of reasons for rejection that would be incorporated into the email, but that's not absolutely necessary.)

 

I used this solution before I upgraded to 7.1, but it doesn't seem to work the same way anymore.

 

For the record, since I have a feeling it will be a question, the "deactivate" option doesn't appear to be appropriate for what I'm trying to accomplish.  It seems to require that the profile be activated before it's deactivated (which I don't want to do, I just want to outright reject).

 

Thanks in advance!

Quote · 13 Dec 2012

Didn't see anything about it not being kosher to bump a post... hopefully someone can let me know, at least, if this can or cannot be accomplished.

Quote · 20 Dec 2012

One more try perhaps?

Quote · 7 Jan 2013

Well, I was told via my support ticket that I would get a response here eventually... so I guess I'm going to keep asking for help on this.

Quote · 29 Jan 2013

The solution you're referring to perfectly works on 7.1.0 but with some additions.
I will begin from the start:

1) Open the file 'administration/profiles.php'
2) Find this code starting from the line 38

//--- Process Actions ---//
if(isset($_POST['adm-mp-activate']) && (bool)$_POST['members']) {
    $GLOBALS['MySQL']->query("UPDATE `Profiles` SET `Status`='Active' WHERE `ID` IN ('" . implode("','", $_POST['members']) . "')");

    $oEmailTemplate = new BxDolEmailTemplates();
    foreach($_POST['members'] as $iId) {
        createUserDataFile((int)$iId);
        reparseObjTags('profile', (int)$iId);

        $aProfile = getProfileInfo($iId);
        $aMail = $oEmailTemplate->parseTemplate('t_Activation', array(), $iId);
        sendMail($aProfile['Email'], $aMail['subject'], $aMail['body'], $iId, array(), 'html', false, true);

        $oAlert = new BxDolAlerts('profile', 'change_status', (int)$iId, 0, array('status' => 'Active'));
        $oAlert->alert();
    }
    echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>";
    exit;
}

3) Copy and paste the following code right after it:

else if(isset($_POST['adm-mp-reject']) && (bool)$_POST['members']) {
    $GLOBALS['MySQL']->query("UPDATE `Profiles` SET `Status`='Rejected' WHERE `ID` IN ('" . implode("','", $_POST['members']) . "')");

    $oEmailTemplate = new BxDolEmailTemplates();
    foreach($_POST['members'] as $iId) {
        createUserDataFile((int)$iId);
        reparseObjTags('profile', (int)$iId);

        $aProfile = getProfileInfo($iId);
        $aMail = $oEmailTemplate->parseTemplate('t_Rejection', array(), $iId);
        sendMail($aProfile['Email'], $aMail['subject'], $aMail['body'], $iId, array(), 'html', false, true);

        $oAlert = new BxDolAlerts('profile', 'change_status', (int)$iId, 0, array('status' => 'Rejected'));
        $oAlert->alert();
    }
    echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>";
    exit;
}

4) Open phpMyAdmin and run this query:

INSERT INTO `sys_email_templates` (`Name`, `Subject`, `Body`, `Desc`, `LangID`) VALUES ('t_Rejection', 'Your Profile Is Rejected!', '<bx_include_auto:_email_header.html />

<p><b>Dear <RealName></b>,</p>

<p>Your profile was rejected !</p>

<bx_include_auto:_email_footer.html />', 'Profile rejection notification', '0');

5) Log into the Admin Panel, go to Tools -> Cache and clear the DB cache.

6) The new Rejection email template can be edited in Settings -> Email Templates.

7) Yes, you're right: the reason of rejection can't be chosen personally. This can be done only by editing the Rejection email each time you want to reject the next member.

8) I hope this helps.

Quote · 9 Feb 2013

Yay! Works like a charm! THANK YOU so much for taking the time to respond, I really appreciate it.

Quote · 11 Feb 2013

Unfortunately this solution seems to have stopped working again with the upgrade to 7.1.1... I have access to an email template to edit, but no longer have a "reject" button on the main member page.

Quote · 25 Mar 2013

Can't find a way to delete my post, but I was a dummy and forgot there was some stuff in the original solution that still needed to be added. This still works just fine!

Quote · 27 Mar 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.