loshMiS

loshMiS supports this item

Supported

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

959 comments found.

Hi there, loving your script but am having trouble with the UPDATE PDO.

I currently have: $db->update( 'family', array ("familyKey" => $key), "familyId = $familyId", array("familyId" => $familyId));

I am trying to update a column called familyKey, in a table called family where the familyId = $familyId

Are you able to provide any assistance?

Sorry, and the error I am getting is:

Uncaught exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens' in [MY PATH]\ASEngine\ASDatabase.php:125 Stack trace: #0 [MY PATH]\ASEngine\ASDatabase.php(125): PDOStatement->execute() #1 [MY PATH]\edit_family_db.php(43): ASDatabase->update('family', Array, 'familyId = 19', Array) #2 {main} thrown in [MY PATH]\ASEngine\ASDatabase.php on line 125

Hey,

Well you get the error because your third parameter is wrong in that function call. It should be "familyId = :familyId". Please check the docs on how to use the update method: http://docs.as-php.com/database-queries.html#update

Regards,

Milos

Hi.

I set the mail configuration to encrypt message with TLS, but when I receive the mail it isn’t encrypted. Am I missing something?

This is the conf.

define(‘MAILER’, “mail”); define(‘SMTP_HOST’, “localhost”); define(‘SMTP_PORT’, 25); define(‘SMTP_USERNAME’, ””); define(‘SMTP_PASSWORD’, ””); define(‘SMTP_ENCRYPTION’, “tls”);

Hey,

Well, that’s not how SMTP encryption work. It does not encrypt the message itself, it just uses a secure channel for sending the message from the app to your SMTP server. To learn more about SMTP, please check the following article: https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol

Regards,

Milos

Milos,

Thanks again for this awesome script.

A quick question, is there a way we can keep a user logged (especially on mobile)?

It seems I have to re-login daily on desktop, and everytime on mobile.

I looked through the configuration parameters to see if there was a variable for this, but couldn’t find one.

Thanks! Jeff

Hey Jeff,

No problem, I’m glad you like it! :)

Well, what you can do is to extend the session duration and set it to few days or something like that. Currently, the session will expire whenever you close the browser, and you can change that inside ASSession.php file. Please check the following documentation section for more details: http://docs.as-php.com/working-with-session.html#session-lifetime

Regards,

Milos

OK… is there any reason why on an iOS device (mobile) I need to log in each time regardless of session duration?

Thanks again for your help!

Jeff

Hey Jeff,

It’s probably because when you close the browser app or open another app it acts the same as when you close the browser on the computer, which means that session will expire automatically in such case.

Regards,

Milos

Can this be integrated within YII? Basically, use as login for users to redirect to there account?

Hey,

Well, this is not a package that can easily be used in some existing PHP framework. So, even though it is probably possible to integrate it with YII, it is not created to be used like that and, unfortunately, I cannot guarantee that it will work properly.

Regards,

Milos

pingcent

pingcent Purchased

Hi there, loving the system! It’s perfect for our needs.

Is it possible to incorporate the login, forgot password, and user registration scripts with our own pages?

I have tried with our own PHP pages and the system doesn’t recognise the input and thought there might be an easier way to do it.

My workaround at the moment is that I have re-styled your existing login page, but I don’t know how this will work going forward.

Thanks again!

Hey,

Of course, you can incorporate it easily with your login, forgot password and user registration form designs. Basically, just make sure that have included all javascript files from original AS design and that your inputs, as well as form tags, have the same IDs that were used inside the default script design.

If you have any issue, always take a look at browser’s console to see what the error is exactly and so you can fix it easily.

Regards,

Milos

Can you make the Twitter, Facebook and Google login buttons look much Attractive and ambient

Hey,

Once you purchase the script you get the whole source code, which means that you can customize it to look however you want.

Regards,

Milos

lenamtl

lenamtl Purchased

Hi,

How can we apply your encryption script to hidden field?

For example to prevent the user changing the ID from browser console.

This is for ID of non sensitive data let say comment_ID.

The hidden field value should be encrypt on form and we should be able to decrypt on sever side to get the correct value.

There is an example on user page <input type="hidden" id="adduser-userId" />

PS I’m using the old version.

Thanks

Hey,

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

Regards,

Milos

lenamtl

lenamtl Purchased

I will but at the moment there is a problem about the price, I will contact Envato support…

finally bought your software. trying to incorporate it into existing site and found that all function are built to return a json message. I had to hack the code that use respond helper function to do return respond and change the respond function to simply do return $data.

is there a better/smarter way to do this ?

with the above changes, and making sure the login screen we have from before was updated with the ASCsrf token, and write some javascript to do CryptoJS.SHA512 before submitting, i’m at a point where I need to write a batch php script to attempt to convert the existing user list to work with AS. the existing app has password in clear text (sigh) I grab data and create the array with proper structure to send to $rc = app(‘user’)->add($data);

tried with 2 users to start with, they get added into as_users, all is great except the password. I tried to use the php function app(‘hasher’)->hashPassword() but that doesn’t do the same thing as javascript CryptoJS.SHA512

is there a way to fix the password handling from the php batch script ?

to verify I went in and updated the password via the GUI and it works, but with 500 users to convert, that is not a path I want to take.

Hey,

Well, if you needed the classes to return arrays instead of JSON, then there is no other way than manually modifying them.

About passwords, as you can see it is first hashed with sha512 hashing algorithm before it is being sent to the server, so, you need to simulate that exact behavior. This means that you need to hash the password with sha512 first, and then pass it through hashPassword() function. Something like following:


$hashed = hash('sha512', $plainTextPassword);
$password = app('hasher')->hashPassword($hashed);

And now you have the $password variable, which is what you should store in DB.

Regards,

Milos

Thank you ! since I use $rc = app(‘user’)->add($data);

all I needed to do was $hashed = hash(‘sha512’, $plainTextPassword); and use $hashed in the $data array I send the the add function. /P

Hi.

Is it possible to link directly to “Create new user tab”

Im trying to use the anchor #create, but i cant make it work..

Hey,

Unfortunately, it’s not possible to link it like that out of the box. You will need to customize it to fit your needs.

Regards,

Milos

Hi, I recently ported a project from another install of AS. I ran a clean install on the add-on domain, populated the database with the necessary fields for my project and began testing. However I have hit a wall -

Upon logging in I am presented with all the usual information I expect, but I am seeing many errors being printed to the page and logs.

[26-Jan-2018 09:40:58 America/Detroit] PHP Fatal error: Call to undefined function app() in /home/origins/public_html/crypto-huntr.com/initialise-database.php on line 3 [26-Jan-2018 09:40:58 America/Detroit] PHP Fatal error: Call to undefined function app() in /home/origins/public_html/crypto-huntr.com/get-votes.php on line 5 [26-Jan-2018 09:41:06 America/Detroit] PHP Fatal error: Call to undefined function app() in /home/origins/public_html/crypto-huntr.com/get-votes.php on line 5 [26-Jan-2018 09:41:06 America/Detroit] PHP Fatal error: Call to undefined function app() in /home/origins/public_html/crypto-huntr.com/initialise-database.php on line 3

When adding “include ‘ASEngine/AS.php’;” to initialise-database.php and get-votes.php I then get -

[26-Jan-2018 14:42:57 UTC] PHP Notice: Constant AS_VERSION already defined in /home/origins/public_html/crypto-huntr.com/ASEngine/AS.php on line 3 [26-Jan-2018 14:42:57 UTC] PHP Notice: Constant DEBUG already defined in /home/origins/public_html/crypto-huntr.com/ASEngine/AS.php on line 7 [26-Jan-2018 14:42:57 UTC] PHP Notice: A session had already been started – ignoring session_start() in /home/origins/public_html/crypto-huntr.com/ASEngine/ASSession.php on line 34

What could be causing this? There is no obvious issue that I can see, have I missed something somehow?

Another problem is that CONSTANTS set in the main parent PHP file are not returning as defined in the sub PHP files, despite them echoing correctly within the included php files.

The site has been migrated correctly and all the database entries are being pulled through okay something has failed massively though.

I might add that this was done on the latest version of AS, the demo site was hosted/ran on the version before that, but I haven’t copied any AS related files to the new install location. Have any functions changed/file locations?

Thanks

Debug mode defaults to on in 2.4, bah should have noticed! Ignore the above, turning off debug seems to have solved it

Hey,

Well turning off debug mode just means that the errors are not displayed on the screen, but they definitely still exist.

When you see “Call to undefined function app()” error it means that you don’t have the latest version of the ASEngne/AS.php file included at the top of your page.

An error which says “Constant AS_VERSION already defined …” means that you have included the AS.php file more than once.

Make sure that, if you are upgrading from an older version of AS, you have updated all files to be up to date and that there are no missing files since there are some new files inside the latest version of AS that were not there before.

Regards,

Milos

while testing during development to incorporate AS into an existing site I on occasion get Invalid CSRF token. I don’t use ajax, and I do have the hidden input field on all forms.

I suspect that it happens when Iet a tab/window sit for a while and come back to it and the token has expired (?)

I see that last check in AS.php, and the die statement.

problem is that if it happens to a customer, all they get is a empty white screen with that message. Is there a way for me to capture that better in a page with a form and either regenerate token or display a message ?

Hey,

You get that message probably because your session expires, or something like that.

You should not regenerate the token for users and if you want, you can customize the message or redirect to some error page by replacing the “die” statement inside the AS.php file with a redirect or some other error message. Basically, you can do whatever you want there when invalid CSRF token is detected.

Regards,

Milos

can i use it for multiple project and can i update it without any changes my customization

Hey,

One license of the script is for one end product only. To learn more about the licenses check: https://themeforest.net/licenses/standard

You will be able to update the script once a new version is released, and, since you will need to do it manually anyway, having it customized will just change the way how you update it, but the process is the same.

Regards,

Milos

pingcent

pingcent Purchased

Hi there, I am trying to delete some data from a table but can’t get it to work. I think there is a problem with my syntax, but I can’t see where.

Can you help?

Syntax is: $db->delete( “message”, “messageReceiverId = :uuid”, “messageFamilyId = :fuid”, array(“uuid” => $removeUserId, “fuid” => $removeFamilyId) );

I want to delete a record from the MESSAGE table where the messageReceiverId = uuid AND messageFamilyId = fuid

Hey,

Yes, your syntax is incorrect. The “delete” method accepts 3 parameters, and inside the example from above you have 4. It should look something like following:

$db->delete( 
    "message",
    "messageReceiverId = :uuid, messageFamilyId = :fuid",
    array("uuid" => $removeUserId, "fuid" => $removeFamilyId)
);

Regards,

Milos

No 2 Factor?

Hey,

Unfortunately, as you can see from the documentation and the demo, there is no 2FA integrated into this script.

Regards,

Milos

lalab996

lalab996 Purchased

hey , I want to make a session destroy , but I have no idea to write the code in ASSession, but I have a code on laravel.

Auth::login($user); $newSessionId = \Session::getId(); //get new session_id after user sign in

How to I transform this code to ASSession , I have try so hard but still failed , can you help me ?

if ($user->session_id) {
    if (\Session::getHandler()>destroy($user>session_id)) {
        // session was destroyed
    }
}
$user->session_id = $newSessionId;
$user->save();
lalab996

lalab996 Purchased

Auth::login($user); $newSessionId = \Session::getId(); //get new session_id after user sign in

if ($user->session_id) {
    if (\Session::getHandler()>destroy($user>session_id)) {
        // session was destroyed
    }
}
$user->session_id = $newSessionId;
$user->save();

Hey,

I’ve just replied to your email.

Regards,

Milos

Hi, Milos. Facebook is saying:

In 35 days, we’re making a security update to Facebook Login that will invalidate calls from URIs not listed in the Valid OAuth redirect URIs field of your Facebook Login settings…

And it is also saying that https://xxxxxxx.com/vendor/hybridauth/?hauth.done=Facebook url will be invalidated.

Please, let me know what should I do. Thanks.

Hey,

Well just add the URL above to the list of “Valid OAuth redirect URIs” inside your facebook application settings and there is nothing to worry about. :)

Regards,

Milos

Ok. Done. Thanks! Regards.

lhiggs

lhiggs Purchased

Good morning, I just purchased your php register login system and am very happy with it so far! I just need to make a few changes, I want to get rid of the address and phone for users, both when adding users and also when they edit their profile. I only need their name, email, username and password stored.

I tried to remove the html code in the corresponding pages which seems to work fine for the admin user but when a normal user logs in I get errors. How should I remove those options?

Thanks! Luke

Hey,

Well removing those fields from HTML is not the only thing that you need to do. You will need to update the following files too:

1) Update ASLibrary/js/users.js file and remove address and the phone from there so they don’t get sent back to the server.

2) Update ASEngine/ASUser class and remove all occurencies related to address and phone.

3) Update the database tables and remove address and phone from there.

Of course, whenever you are doing some customization work on the app, I would recommend you to enable debug mode so you can see the errors on the screen: http://docs.as-php.com/developer-guide.html

Regards,

Milos

hey there i wanna get this, but my question is can i add something to my prev pages so that they have to logged in, like members.mysite.com they sign in but then when they click a link that goes to reportbot.mysite.com they need to be logged in to view. Even if they just type Reportbot.mysite.com comes up with you need to login?

Awesome! Thanks milo i appericate all the help, another thing sorry. The Nav Bar i added some things to it but i cant seem to find where i can make it seen by other users, also is it possible to make it seen by select user groups, like Usergroup Gold can see everything but usergroup silver can only see select things?

iv tried everything i looked in comments too and everything i try i get an error or internal 500 error. im using the same code above that you sent me, again im trying to rescrict the role “user” that isnt role “gold” from accessing that page. and i cant seem to get it to worl

Hey,

Well if you get 500 error it means that you are doing something wrong. I would recommend you to enable debug mode (check the docs) and to see what the error is about, so you can fix it.

About the navbar, it is pretty simple to filter things for specific user groups. If you check the templates/sidebar.php you will see how some things are filtered to display for admin role only. The same logic can be applied to any role, as it is described inside the docs: http://docs.as-php.com/authorization.html#role-specific-content

Regards,

Milos

How to stop Auto logout . its so embarrassing . please tell me how to stop auto logout fir random insert data or any changes

by
by
by
by
by
by