Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
I don't know what's going on but the form was working properly before...Now, whenever someone hits the register button it keeps throwing Cheating?!

register.php

Code: Select all
<?php require_once( '../admin/cms.php' ); ?>
<?php require_once( '../PHPMailer/PHPMailerAutoload.php' ); ?>
    <cms:template title='Registration' hidden='1' />
   
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
   <link rel="stylesheet" type="text/css" href="../css/log.css" />
</head>
   
<body>
<div id="created_by_imagins" >
   
<cms:if action='activate' >
   <h1>Acrivare cont</h1>
<cms:else />
    <h1>Creare cont: </h1>
</cms:if>

<div class="padding">
    <cms:if k_logged_in >
      <!-- what is an already logged-in member doing on this page? Send to profile.-->
            <!--Authenticated User-->
         <cms:if k_user_access_level eq '2' >
               <cms:redirect url="<cms:show k_site_link />users/profile.php" />
            </cms:if>
            <!--Authenticated User (Special)-->
         <cms:if k_user_access_level eq '4' >
               <cms:redirect url="<cms:show k_site_link />user.php" />
            </cms:if>
            <!--Admins-->
         <cms:if k_user_access_level eq '7'>
               <cms:redirect url="<cms:show k_site_link />search.php" />
            </cms:if>
            <!--Admins-->
         <cms:if k_user_access_level eq '10'>
               <cms:redirect url="<cms:show k_site_link />admin" />
            </cms:if>
    </cms:if>
   
    <!-- are there any success messages to show from previous actions? -->
    <cms:set success_msg="<cms:get_flash 'success_msg' />" />
    <cms:if success_msg >
        <div class="notice">
            <cms:if success_msg='1' >
                Ti-am trimis un email de confirmare pentru a-ti activa contul!
            <cms:else />
                Contul a fost activat! Apasa pe Login pentru autentificare:
                <a href="<cms:login_link redirect=k_site_link />">Login</a>
            </cms:if>
        </div>
    <cms:else />
       
        <!-- now the real work -->
        <cms:set action="<cms:gpc 'act' method='get'/>" />
       
        <!-- is the visitor here by clicking the account-activation link we emailed? -->
        <cms:if action='activate' >
            <h1>Activare cont</h1>
       
            <cms:process_activation />
           
            <cms:if k_success >
                 <cms:set_flash name='success_msg' value='2' />
                 <cms:redirect k_page_link />         
            <cms:else />
                <cms:show k_error />
            </cms:if>
       
        <cms:else />
       
            <!-- show the registration form -->

            <cms:form
                masterpage=k_user_template
                mode='create'
                enctype='multipart/form-data'
                method='post'
                anchor='0'
                >

                <cms:if k_success >       

                    <cms:check_spam email=frm_extended_user_email />           

                    <cms:db_persist_form
                        _invalidate_cache='0'
                        k_page_name = "<cms:random_name />"
                        k_publish_date = '0000-00-00 00:00:00'
                    />                   


                    <cms:if k_success >
                        <cms:php>
                            $mail = new PHPMailer;
                            $mail->CharSet  = 'UTF-8';
                            $mail->Encoding = 'quoted-printable';
                            <cms:pages masterpage="email.php">
                            $mail->isSMTP();   // Set mailer to use SMTP
                            $mail->Host = '<cms:show my_host />';  // Specify main and backup SMTP servers
                            $mail->SMTPAuth = true;    // Enable SMTP authentication
                            $mail->Username = '<cms:show my_email />';  // SMTP username
                            $mail->Password = '<cms:show my_password />';   // SMTP password
                            $mail-> SMTPSecure = 'none';     // Enable TLS encryption, `ssl` also accepted
                            $mail->Port = <cms:show my_port />;   // TCP port to connect to
                            </cms:pages>
                           
                            $mail->addAddress('<cms:show frm_extended_user_email />', '<cms:show frm_k_page_title />');  // Add a recipient
                            <cms:pages masterpage="email.php">
                            $mail->addReplyTo('<cms:show frm_email />', '<cms:show frm_name />');
                           
                            $mail->WordWrap = 50;    // Set word wrap to 50 characters
                            $mail->isHTML(true);     // Set email format to HTML
                           
                            $mail->From = '<cms:show my_email />';
                            $mail->FromName = '<cms:show my_email_name />';
                           
                            $mail->Subject = '<cms:show my_email_name />';
                            </cms:pages>
                           
                            $mail->Body    = '
                            Apasa <a href="<cms:activation_link   frm_extended_user_email   />">aici</a> pentru a-ti activa contul!
                           
                            <br /><br />
                            Multumim,<br />
                            Echipa Training Challenge!
                            ';
                           
                            if(!$mail->send()) {
                            } else {
                            }
                        </cms:php>
                                               
                        <cms:set_flash name='success_msg' value='1' />
                        <cms:redirect k_page_link />
                    </cms:if>
                </cms:if>

                <cms:if k_error >
                    <h3><cms:each k_error ><cms:show item /><br /></cms:each></h3>
                </cms:if>       

                <label>Nume:</label>
                <cms:input name='k_page_title' type='bound' /><br />
               
                <label>Prenume:</label>
                <cms:input name='prenume' type='bound' /><br />
               
                <label>Email:</label>
                <cms:input name='extended_user_email' type='bound' /><br />
                   
                <label>Parola:</label>
                <cms:input name='extended_user_password' type='bound' /><br />
               
                <label>Repeta Parola:</label>
                <cms:input name='extended_user_password_repeat' type='bound' /><br />       
               
                <button type="submit" name="submit">Creare cont!</button> 

            </cms:form>
           
        </cms:if>
    </cms:if>   
   
    </div>
    </div>
   
<?php COUCH::invoke(); ?>
Hi Alin,

That 'cheating' message is very rare to encounter and usually happens when a user tries to set the 'access level' of her account to something higher than what has been set by the admin.

Can't see that happening in your code so perhaps that is happening from some snippet etc.

Could you give me access to your site? Allow me to take a look at what's happening.
Please get me the FTP+Couch super-admin creds (along with clear directions on how to elicit this issue) if that is ok.

Thanks
2 posts Page 1 of 1
cron