Code

Discussion on Advanced Security - PHP Register/Login System

Discussion on Advanced Security - PHP Register/Login System

Cart 2,756 sales

niftycode supports this item

Supported

This author's response time can be up to 1 business day.

1144 comments found.

Dear loshMiS,

I have a pre sale question. Is it possible, when someone uses facebook to create an account, to create their own username, instead that the system puts the first and sure name together?

Regards Ries.

Hey,

Out of the box that’s not possible since the username will be automatically generated for the user. But, of course, you can modify the app to fit your needs.

Regards,

Milos

How do I make another language default? And which file do I use to change the UTC in my region?

I don’t think it’s in your support!

Thanks!

Hey,

You can set the default language by updating the DEFAULT_LANGUAGE constant inside the ASConfig.php file.

To change the timezone just update the timezone identifier that is being passed as a parameter for date_default_timezone_set function at the top of ASConfig.php file. Here is the list of supported PHP timezones: https://www.php.net/manual/en/timezones.php

Regards,

Milos

When I downloaded the files. This “ASConfig.php” File Didn’t Come…

Hey,

The ASConfig.php file is being generated after successful installation. Please check the configuration documentation for more info: https://milos.support-hub.io/articles/advanced-security-configuration

Regards,

Milos

Please can u tell me how we can add a field in the user resgistration, congrats for your code

Hey,

I’m sorry but your support for this item has expired. If you have any questions please renew the support and submit a ticket on https://milos.support-hub.io

Kind regards,

Milos

After your latest update login is not working without incognito mode. I have tried in different PC also but same thing happened. Any suggestion.

Hey,

This script was last updated on February 1st, 2019, so not sure how you get the issues with it now…

Anyways, if everything works in incognito mode then it has to work in the regular mode as well, just make sure that you have cleared the browser cache since some JavaScript files might be cached.

Regards,

Milos

Actually before 2 to 3 days ago, I was update your latest script in my server.

Hi! I keep getting a “Invalid CSRF token” error when I post a form to itself. It works fine when I have a separate processing page, but I would like to do it on the same page. How can I resolve this?

Hey,

Please check the documentation to learn more about the CSRF protection and forms: https://milos.support-hub.io/articles/csrf-protection-and-forms

Btw, your support for this item has expired. Please extend the support if you have any questions and create a ticket on https://milos.support-hub.io

Kind regards,

Milos

Hi Milos, Are you looking to upgrade PHPMailer to version 6 soon?

Hey,

It will be updated when I update the AS app. No ETA for it at the moment.

But, anyway, feel free to update it on your own since it should be pretty straightforward.

Milos

Thank you for the fast response (:

How does this integrate with the powerful Wordpress? I don’t know how to code.

I want to use this instead of the wordpress user administration center.

Use this as the user account hub for wordpress.

Hey,

AS is not made to be used with Wordpress so, unfortunately, I will not recommend you to purchase it if you don’t know how to code.

Kind regards,

Milos

Hi and congratulations for your great script. I have a question: in users list table (users.php) how can I display first and last name instead of registration date?

Thanks in advance, Luca

Hey Luca,

You will just need to customize the users.php file and update the table at the that renders the users, nothing more than that.

Btw, for any future requests, please create a ticket on https://milos.support-hub.io instead of posting the comments here since sometimes I miss the comment people post here and you can wait for the response for days.

Kind regards,

Milos

hello it is possible to make the home page www.example.com accessible for every one and make login page on www.example.com/login.php and registration on www.example.com/register.php ?

Hey,

Of course, you can customize the script however you want since you get the whole source code.

Kind regards, Milos

Hey!

is it possible to integrate this user/registration system into Laravel web app? I have purchased a laravel real estate script web app here on codecanyon but the login and registration system doesn’t work.

Hey,

Unfortunately no, AS is not designed to be used with Laravel PHP framework.

Regards,

Milos

Hi Molos,

I use your Advanced security login and it works great!

Could you tell me what I have to change in my script below to use your db connection? And do I have to extend this class?

I would really appreciate your help.

With regards, Fred

Class:

<?php class Flow { public $errors = array(); public function __construct() { global $path; global $user; $this->user = $user; $this->query_where = " AND clientActive = '1' "; } public function clients() { return $this->query(" SELECT clientID, clientName FROM clients WHERE clientID != '' " . $this->query_where . " GROUP BY clientID ORDER BY clientName ASC "); } } ?>

I’ve just replied to your ticket via Support Hub.

Kind regards,

Milos

Hi Milos, thanks for your reply.

I have made some progress and added my class through the constructor. This works and now I can call my own methods within the added class. But when I load a php file with ajax with the same class included, I get an error “Uncaught Error: Call to a member function nameFunction() on null”. Could you tell me why this is happening?

Thanks!

Example: require_once($_SERVER['DOCUMENT_ROOT']."/classes/class.flow.php"); $flow = $container['flow']; $clients = $flow->flowClients($id);

Hey,

No problem.

Unfortunately I cannot help you much with the custom code you wrote. It’s probably because you forgot to initialize a class somewhere, or to include the AS.php class at the top of your own class, or something like that.

Milos

HI, after downloading the script I cannot seem to find the ASConfig.php file. It’s not in the AsEngine folder.

Sorry disregard this. I just read that config file is created once installation is completed

I detected in your demo that when clicking on logout the page does not load and does not redirect to the login page, only updating the page to be directed to the login page, what would be this error?

Hey,

Not sure what exactly you are referring to but, when you click on the Logout link your session will be destroyed, you will be logged out and automatically redirected to the login page.

Btw, for any future questions please create a ticket on https://milos.support-hub.io since that’s the preferred way to get support for any of my items.

Regards,

Milos

is it possible to make login in to multiple devices at the same time? The script have encrypted cookies, XSS attack prevention? Comes with google recaptcha?

Hey,

You can be logged in on multiple devices at the same time, that is the default behavior. If you need to limit the number of active sessions you’ll need to implement that on your own since it does not come out of the box.

The script use only the session cookie which uses default session mechanism in PHP. This cookie is not encrypted but the session is being regenerated every time when you log in, log out, or update account password.

XSS attacks are prevented out of the box and there is no google recaptcha, as you can see from the demo.

Btw, for any future questions please create a ticket on https://milos.support-hub.io since that’s the preferred way to get support for any of my items.

Regards,

Milos

Hello, I would like to know if it is possible to login by email and password rather than login by username and password? thank you

Hey,

Unfortunately no, you will have to slightly modify the app to use email instead of the username for logging in.

For any future questions please create a ticket on https://milos.support-hub.io since that’s the preferred way to get support for any of my items.

Regards,

Milos

hi, i bought just bought this to use as login system and i tried to make another table like the users. i copied all files related to users and change to list (name of the new table). every time i add details i get an error and its not saving in the server.

when i check to console the error is in common.js:78 – ‘errors’ of undefined

Hey,

Unfortunately I cannot provide support for things you have added on your own. However, I would recommend you to do the following:

1) While developing any new features, make sure that you enable “Debug Mode” so you can see all the PHP errors: https://milos.support-hub.io/articles/advanced-security-developer-guide#debug-mode

2) The error you are getting most likely means that non-json response is being returned from the server (probably a response that contains an error message or something). In this case you can see the error from the network tab of the browser. Please check the following article since it contains more info on how you can debug AJAX requests: https://milos.support-hub.io/articles/advanced-security-developer-guide#debugging-ajax-requests

Regards,

Milos

thanks, i already solved it.

Does this script work with postgresql. If changes is required in how many places ?

Hey,

I haven’t actually tested the app on PostgreSQL but, since it uses PDO under the hood it means that probably with some slight modifications it can be used with PostgreSQL.

Most of the queries goes though ASDatabase class (check https://milos.support-hub.io/articles/advanced-security-database-queries for more info) so even if there are some modifications required, it be mostly inside this class.

Regards,

Milos

I am using POSTGRESQL. I downloaded the the script and made following changes

public function __construct($type, $host, $databaseName, $username, $password)
{
    //parent::__construct($type.':host='.$host.';port=3975;dbname='.$databaseName.';charset=utf8', $username, $password);
    parent::__construct("pgsql:host=localhost;dbname=phplogin;user=tester;password=tester");
    //$this->exec('SET CHARACTER SET utf8');
}

I could complete the installation. But no tables are created in database.

I suspect following codes

private function createDatabaseTables(array $params)
{
    //$this->db->query(
    //    "ALTER DATABASE `" . $params['db_name'] . "` 
    //    DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci" 
    //);
}
$sql = file_get_contents($this->stubsPath . "/test.sql");
$this->db->query($sql); // This is one issue.

Content of as.sql may not work. As this is not the syntax of postgresql query. Please reply with best suggestion and solution for POSTGRESQL

Hey,

As for the installation, you will probably need to modify the as.sql and modify those “CREATE TABLE” statements to match the PostgreSQL syntax. The as.sql file is basically responsible for creating database tables so if it fails the tables won’t be created at all.

The changes you made inside the ASDatabase class are looking good from what I can see.

Regards,

Milos

Hi Milos.

I just installed AS version 3.0.1 and it’s looks great. But with a wrong combination of username and password I get this error:

“POST https:// example . com/ASEngine/ASAjax.php 422”

How can I fix this?

Kind regards, Fred.

Hey Fred,

There is nothing to fix there. The 422 response is returned from the server if you provide invalid credentials and it is how it should be. You see it as an error inside the console but it is just there because the console will show every HTTP response that is not 2XX as an error.

Btw, your support for this item has expired. If you have any questions in the future please extend the support and create a ticket on https://milos.support-hub.io

Regards,

Milos

Hi Milos,

I am using AS version 2.3 and want to upgrade to latest version. Do you have any suggestion? Can I upgrade directly from version 2.3 to 3.0.1? Thanks so much.

Phu

Hey Phu,

You will need to upgrade one version at the time to be sure that you haven’t missed something. Just make sure that you follow the upgrade guide available on https://milos.support-hub.io/articles/advanced-security-upgrade-guide

Kind regards,

Milos

Thanks so much Milos for your reply. One more thing I would like to ask you. Currently I can only download the latest version (3.0.1). Do you also have the version 2.4 and 3.0.0 for my incremental upgrade? Thank you very much for great support.

Hey,

Sure. Just create a ticket on https://milos.support-hub.io (you can select the Other category) and I’ll send you those versions.

Kind regards,

Milos

i wanna double confirm if its compatible with PHP7.1?

Hey,

Yes it is. As a matter of fact, the demo website is running on PHP 7.1.

Regards,

Milos

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey