• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Remove e-mail requirement from Znote AAC 1.5

Eve

New Member
Joined
Jul 1, 2007
Messages
19
Reaction score
1
I'm using Znote AAC 1.5 and TFS 1.1.

I'm removing things because all I need is basic acc and char creation & management. So, how do I remove the email and country req. from the account creation page?
 
Open your register.php in /www file and at line 8, find:
Code:
    $required_fields = array('username', 'password', 'password_again', 'email', 'selected');

Remove the fields you don't want as required ones.
 
Open your register.php in /www file and at line 8, find:
Code:
    $required_fields = array('username', 'password', 'password_again', 'email', 'selected');

Remove the fields you don't want as required ones.


Code:
if (empty($_POST) === false) {
    // $_POST['']
    $required_fields = array('username', 'password', 'password_again', '', '');
    foreach($_POST as $key=>$value) {
        if (empty($value) && in_array($key, $required_fields) === true) {
            $errors[] = 'You need to fill in all fields.';
            break 1;

I've left e-mail in blank and didn't choose country.

Code:
[*]A valid email address is required.
[*]That email address is already in use.

E-mail is still needed.
 
Make sure also between lines 147-150:
Code:
            <li>
                Email:<br>
                <input type="text" name="email">
            </li>

There is no "..="email" required>" in there, if there is, remove it as I got above inside the CODE.
Not sure if you have to leave -> '', '' <-, by just removing all it should work:

PHP:
if (empty($_POST) === false) {
    // $_POST['']
    $required_fields = array('username', 'password', 'password_again');
    foreach($_POST as $key=>$value) {
        if (empty($value) && in_array($key, $required_fields) === true) {
            $errors[] = 'You need to fill in all fields.';
            break 1;
EDIT: Also, if you want to remove all requirements, check the code above and it says $required_fields) === true), make it false.
EDIT2: Between line 66-68 delete this code:
PHP:
        if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) {
            $errors[] = 'A valid email address is required.';
        }
 
Make sure also between lines 147-150:
Code:
            <li>
                Email:<br>
                <input type="text" name="email">
            </li>

There is no "..="email" required>" in there, if there is, remove it as I got above inside the CODE.
Not sure if you have to leave -> '', '' <-, by just removing all it should work:

PHP:
if (empty($_POST) === false) {
    // $_POST['']
    $required_fields = array('username', 'password', 'password_again');
    foreach($_POST as $key=>$value) {
        if (empty($value) && in_array($key, $required_fields) === true) {
            $errors[] = 'You need to fill in all fields.';
            break 1;
EDIT: Also, if you want to remove all requirements, check the code above and it says $required_fields) === true), make it false.
EDIT2: Between line 66-68 delete this code:
PHP:
        if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) {
            $errors[] = 'A valid email address is required.';
        }


I had to remove some other lines that I ended up figuring out but it finally worked. Thanks a lot, you are the most awesome (is 'awesomest' a correct slang?)?
:3
 
Glad to know that, I'm not best experienced in PHP, but trust me, lately I've been playing with my website a lot so probably could have done better!
Awesomist :p
 
Back
Top