Page 1 of 1

Avatar renaming and data retreval

Posted: Mon Feb 11, 2019 8:56 pm
by HankRock
This is really two separate issue that are linked in a way:

First, is there a reason / way to control how the avatars are renamed once uploaded? I am using the mysql database and it adds a random number string to the photo.

Second, I am trying to create a page that shows the fullname and avatar images, but due to the fact that the script adds the random number to the filename I can't figure out how to do this automatically. Any suggestions?

Re: Avatar renaming and data retreval

Posted: Mon Feb 11, 2019 9:35 pm
by Pablo
1. The reason why this is done is for security, so hackers cannot guess the filename on the server.
If you do not care about security then you can modify the code and remove the random filename.
2. You can display the avatar on the page via de 'Login Name' object.

Re: Avatar renaming and data retreval

Posted: Tue Feb 12, 2019 2:07 pm
by HankRock
Thanks for the reply,

1. Do I have to change the form to HTML to edit it or is it in a php code somewhere? Also, I'd love to just have it rename the file with the fullname from the registration form!

2. how do I display all the avatars, not just the currently logged in persons. I would like to create like a member directory!

Re: Avatar renaming and data retreval

Posted: Tue Feb 12, 2019 2:10 pm
by Pablo
1. Right click the login form and select 'Convert to form' then you can customize the PHP code.
2. There is no standard solution for this, this will require a custom script.

Re: Avatar renaming and data retreval

Posted: Tue Feb 12, 2019 2:50 pm
by HankRock
The login form? or the signup form?

Re: Avatar renaming and data retreval

Posted: Tue Feb 12, 2019 2:53 pm
by BaconFries
Pablo wrote: Tue Feb 12, 2019 2:10 pm 1. Right click the login form and select 'Convert to form' then you can customize the PHP code.

Re: Avatar renaming and data retreval

Posted: Tue Feb 12, 2019 2:54 pm
by HankRock
By the way, when I use the login name object, all I get is a white square, no avatars

Re: Avatar renaming and data retreval

Posted: Tue Feb 12, 2019 3:08 pm
by Pablo
the signup form, the one you want to modify.