loshMiS

loshMiS supports this item

Supported

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

892 comments found.

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?

Thanks,

Tim

Hey Tim,

Unfortunately no, there is no way to limit user to only one active session at the time with AS.

Regards,

Milos

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.

https://dba.stackexchange.com/questions/35183/mysql-maximum-number-of-connections-on-a-per-user-basis-possible

Would “Grant” provide the solution?

Thanks,

Tim

Hey Tim,

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. :)

Regards,

Milos

djinnsour

djinnsour Purchased

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

djinnsour

djinnsour Purchased

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.

Hey,

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

Regards,

Milos

djinnsour

djinnsour Purchased

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!

monil83

monil83 Purchased

Hi,

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.

monil83

monil83 Purchased

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 Stack trace: #0 /Applications/MAMP/htdocs/PhpProject3/ASEngine/ASRegister.php(102): ASEmail->confirmationEmail(‘monil83@gmail.c...’, ‘dad6656ea6d9c40…’) #1 /Applications/MAMP/htdocs/PhpProject3/ASEngine/ASAjax.php(13): ASRegister->register(Array) #2 {main} thrown in /Applications/MAMP/htdocs/PhpProject3/ASEngine/ASEmail.php on line 45 Stack trace: #0 /Applications/MAMP/htdocs/PhpProject3/ASEngine/ASRegister.php(236): ASEmail->passwordResetEmail(‘monil83@gmail.c...’, ‘7979de9ab55b19b…’) #1 /Applications/MAMP/htdocs/PhpProject3/ASEngine/ASAjax.php(21): ASRegister->forgotPassword(‘monil83@gmail.c...’) #2 {main} 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

Hey,

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 “noreply@localhost.dev” 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”. :)

Regards,

Milos

monil83

monil83 Purchased

Awesome..worked!!!

ARX-DM

ARX-DM Purchased

Hi loshMiS,

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?

Thank you.

Hey,

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. :)

Regards,

Milos

Hi, the latest update you have remove isValidRequest in ASCsrf. What is the reason for that. Any issues if i keep the old code?

Hey,

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.

Regards,

Milos

Also ASConfig file is missing in the download

Hey,

Of course that ASConfig.php file is missing. That’s how it should be since that file is generated after successful installation.

Regards,

Milos

baignoire

baignoire Purchased

hi,

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..

thx raphael.

baignoire

baignoire Purchased

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)...

baignoire

baignoire Purchased

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 !!

Hey,

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. :)

Regards,

Milos

I’d like to know which the minimum set of files I have to copy in the server for a full functional login system

Hey,

You need to copy all files except documentation and install folders for the application to work properly.

Regards,

Milos

Thanks, well copied.

Is it possible to login via Ajax call ?

Thanks for the response. Is ASAjax.php documented or do I have to analyse the PHP code ?

Hey,

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.

Regards,

Milos

Thanks again.

Hi, I was going through the documentation but I couldn’t see this info. How can I access the current user information through javascript? Thanks..

Hey,

I’m sorry but your support for this item has expired. Please extend the support if you need my help.

Regards,

Milos

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?

Hey,

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

Regards,

Milos

by
by
by
by
by
by