This author's response time can be up to 1 business day.
Quick question on limiting user logins in the software as I could not find anything mentioned anywhere.
Is there a way to limit user login to ensure only one user at a time is logged in at a time?
Unfortunately no, there is no way to limit user to only one active session at the time with AS.
Just replying here to limiting connections to one per user.
Is that something that you could customize for a fee?
I referenced this article but have not gone any further yet.
Would “Grant” provide the solution?
I’m really sorry but I don’t have time for any custom development work at the moment.
About this link you are sharing, this has nothing to do with application users. It is explaining how to limit number of connections for database users, which is completely different thing.
In a nutshell, what you would need to do is to implement database session handler (something like it is described here http://culttt.com/2013/02/04/how-to-save-php-sessions-to-a-database/) and then whenever a user logs in you check if there is already active session for that user and allow him to log in only if there are no active sessions. Hopefully this will help you to implement what you need.
I purchased your “PHP Register / Login System” last week. I am trying to use it to recreate a front end use system where they kick off scripts that query a database and display results using Lazy_Mofo. The Lazy_Mofo script is fairly simple, just query the table and display the results in a pretty grid. I have that working on two different platforms with pretty much zero configuration. But, when I try it on the server with your login system it is like the lazy_mofo script does not even execute. I have verified other PHP scripts work, like phpinfo, the user can access mysql, the database and table.
Any idea if there is something in this System that prevents another PDO/PHP script from running?
Is there something in your system that prevents another PDO/PHP script from running?
Envato Marketplace purchase code: b9c44077-0514-47ee-82f7-e2fb797bb012
Just to follow up, The “PHP Register / Login System” is working fine. Got everything installed with no problem. Verified PDO is installed using ‘php -m | grep -i pdo’. Just having this one unusual issue. Not sure if it is related to the ASdatabase class or not.
Nope, there is nothing inside the system which prevents another PHP script with PDO from running. There is probably something else related on how you have integrated your platform with AS. To be able to see the issues, make sure that you enable debug mode inside AS so you can see the errors on the screen, since that will help you to figure out what the problem is: http://docs.as-php.com/developer-guide.html#debug-mode
Looks like my install script failed when installing mbstring. Enabling debug in AS allowed me to see the error. Problem solved. Thanks for your help!
I have purchased this app lately and when I try to login through facebook, it redirects me to http://localhost:8000/login.php#_=_. It does not save any info on the as_users as well. The error that I receive on the debug file is “Authentication failed! Facebook returned an invalid user id.”. I have checked my app id and secret id’s and they are all correct.
Please suggest a solution to this.
Thanks for getting back to me. I’ll check and let you know how to proceed as soon as possible.
Few questions I have about your setup:
1) How does your callback url looks like?
2) Which Facebook API version does your application use? Is that the newest version v2.10? You can get that info from developers.facebook.com where you have created the app.
Thanks for your prompt reply.
My callback URL is set as http://localhost:8000/vendor/hybridauth/ and the API version is v2.10.
Thanks for your reply. The problem is actually with HybridAuth version that is being used by the app for social authentication. New version of AS is ready to be uploaded to CodeCanyon and in this version those bugs will be fixed, but if you cannot wait for it just contact me via contact form on my CodeCanyon profile page and I’ll send you the zip file.
Hi Milos. Sent you a PM
Hi Milos, I upgraded to the new version you emailed me. However, every time I create a new user, it comes up with an “undefined” error. The info does get added to the table but I do not receive a confirmation email. If you could help me fixing this.
Hmm, that’s strange. Is that clean installation or you have modified something inside it?
Btw, version 2.4 is now official since it is released on CodeCanyon too, so it is the same as the one I sent you back then.
Fresh installation..I did download the one on codecanyon as well but I still get the same error.
The social media login works perfect now. Creating a new user is giving the above error though
Can you send me the url so I can check how it works? Also, don’t forget to enable debug mode so I can properly see the errors.
Hi Milos..I am currently working on a localhost. But below are the errors I am getting for the create user and password reset page.
”/ASEngine/ASAjax.php – Uncaught exception ‘Exception’ with message ‘E-Mail could not be sent. Info: Invalid address: (punyEncode) noreply@localhost:8000’ in /Applications/MAMP/htdocs/PhpProject3/ASEngine/ASEmail.php:45
#0 /Applications/MAMP/htdocs/PhpProject3/ASEngine/ASRegister.php(102): ASEmail->confirmationEmail(‘email@example.com...’, ‘dad6656ea6d9c40…’)
#1 /Applications/MAMP/htdocs/PhpProject3/ASEngine/ASAjax.php(13): ASRegister->register(Array)
thrown in /Applications/MAMP/htdocs/PhpProject3/ASEngine/ASEmail.php on line 45
#0 /Applications/MAMP/htdocs/PhpProject3/ASEngine/ASRegister.php(236): ASEmail->passwordResetEmail(‘firstname.lastname@example.org...’, ‘7979de9ab55b19b…’)
#1 /Applications/MAMP/htdocs/PhpProject3/ASEngine/ASAjax.php(21): ASRegister->forgotPassword(‘email@example.com...’)
thrown in /Applications/MAMP/htdocs/PhpProject3/ASEngine/ASEmail.php on line 72
/ASEngine/ASAjax.php - Uncaught exception 'Exception' with message 'E-Mail could not be sent. Info: Invalid address: (punyEncode) noreply@localhost:8000' in /Applications/MAMP/htdocs/PhpProject3/ASEngine/ASEmail.php:72
Well it’s clear enough what the issue is from the error that you are getting. You should update the MAIL_FROM_EMAIL constant inside the ASConfig.php file to some email that has valid domain name, something like “firstname.lastname@example.org” or just “noreply@localhost”.
You are getting this error because your mail server is refusing to send an email when the “from” email address is invalid, and in your case it is invalid because there is a port number inside of it and it looks like “noreply@localhost:8000”.
I did the upgrade from 2.3 to 2.4 and there is a small problem.
The path to the “PHPMailerAutoload.php” file has changed and generates an error on the login page. I easily resolved by changing the folder path, but I think you should fix it.
The problem comes from “ASEngine/ASEmail.php”.
At line 10 you would be calling the path ”/../vendor/phpmailer/PHPMailerAutoload.php” and after the update you should call the path ”/../vendor/phpmailer/phpmailer/PHPMailerAutoload.php”.
I also noticed that you in version 2.4 no longer call this file. Should the change be made, or did you forget to ask for some more change in the new documentation?
That line should be completely removed. It looks like I forgot to add it inside the docs that are packed with the application, but it added in online documentation that you should upgrade ASEmail.php file to the latest version: http://docs.as-php.com/upgrade-guide.html#upgrade-2-4
Btw, always check the online documentation since it is more up to date.
Hi, the latest update you have remove isValidRequest in ASCsrf. What is the reason for that. Any issues if i keep the old code?
You can keep the old code if it works on your server, however I’ve removed it since a lot of users reported issues with it on different servers and it doesn’t really improve the CSRF protection, so there is no reason to keep it there.
Also ASConfig file is missing in the download
Of course that ASConfig.php file is missing. That’s how it should be since that file is generated after successful installation.
could you give me quick hints on how to add custom fields to user_details :
i edited the html form on ‘profile.php’,
i edited the jquery ajax “profile.updateDetails()” in ‘ASEngine/js/profile.js’
i think i am missing the php mysql file to talk to db…
am i close or is there much to do yet ???
sorry to ask directly, but i didn’t find anything in the comments or the doc about it..
answering to myself :
i edited also “ASengine/user.php” => i can now save a custom field from the profile page to the db
one problem remaining : the profile page doesn’t show the new value (that is stored in the db)...
speaking alone for one more time :
last file to edit : ASEngine/AS.Php
and voilà !! it looks like it is working
i do some testing and add another custom field in user details and i ll try to let you know !!
I’m glad that you figured it out. It is actually pretty simple, you just need some time to figure which parts of the application should be modified, but when you figure it out once it’s much easier next time.
I’d like to know which the minimum set of files I have to copy in the server for a full functional login system
You need to copy all files except documentation and install folders for the application to work properly.
Thanks, well copied.
Is it possible to login via Ajax call ?
Yes. In fact, AS is already using AJAX for user login.
Thanks for your quick response, but I cannot understand how. I understand how to protect a page with PHP code, but how to use an Ajax call from one page to activate protected functions from the same page, I do not see how to do it from your docs.
Not sure that I understand what exactly you want to do, but you just send and ajax request to ASAjax.php file with appropriate “action” value to get the data or do whatever you want… Sending an ajax request from from one page to the very same page is something that you should try to avoid.
Thanks for the response. Is ASAjax.php documented or do I have to analyse the PHP code ?
It’s not inside the documentation, but actually there is really nothing to document there. It is pretty simple and if you take a look at it you will see how it works. Basically you just send specific “action” value and then depending on that action value you execute specific code.
But anyways, you don’t have to use ASAjax.php if you don’t want to. You can create your own files that will handle AJAX requests and just include ASEngine/AS.php on top of them so you can get access to all AS related features.
I’m sorry but your support for this item has expired. Please extend the support if you need my help.
Hi! Considering to buy this.
How is this script to translate for use on a norwegian website?
Is there seperate language files to make it easy to make a new translation?
You can easily translate it to any language you want just by updating the language file. More about the localization is available inside the docs: http://docs.as-php.com/localization.html
Use, by you or one client, in a single end product which end users are not charged for. The total price includes the item price and a buyer fee.
Use, by you or one client, in a single end product which end users can be charged for. The total price includes the item price and a buyer fee.
View license details
Get it now and save up to $5.50
Deliver better projects faster. Photos, templates & courses
Unlimited downloads. Only $29/month
Learn almost anything with
Envato Tuts+ for free
9000 free tutorials, 3000 paid courses
Designers matched perfectly to
you on Envato Studio
2000 artists ready to undertake your work