Database with multi-users... - Forum

Forum Navigation
You need to log in to create posts and topics.

Database with multi-users...

Hi Luis,

I wonder :

Imagine that I want to create a PWA using a database (SQLlite or MySql), how to make so that several users can use the software without having access to each other's data?

I would like to be able to put my project online, and those who go to the site can install the PWA, without me having anything to do (especially for the database).

I am open to any suggestion.

Best regards,

Denis

Hi Denis (@cdy44-2),

Please download and install the attached neoPhp plugin. It includes some fixes and improvements that will be included in VisualNEO Web next release, including better multiuser database support.

When you use the neoPhp user related comands a new table will be created if not exists, in the user database, whose name is "neousers". (neoPhpUserInsert, neoPhpUserErase and neoPhpUserChangePassword).

On that table each new user will have his own id number. You get that number into VisualNEO Web whenever there is a log-in the same way you get his name, email, etc. When you store any kind of information on other tables just remember to include the current "userid" as a field to know who is the owner of that information. And whenever you get information from those tables use the "userid" again to fetch only data related to the current user.

When working with multiple users it's very important to configure the users permissions in config.php.

Let my know if you have any doubt.

Regards.

Uploaded files:
  • You need to login to have access to uploads.
Vadim has reacted to this post.
Vadim

Thank you Luis !
I will check it as soon as possible !
Best regards !

Hi @luishp,

Sorry to ask that, but if a day you have some spare time ( lol ! I think that you are a very busy man ! :) ), do you think you can plan to make a tuto about how to use every actions of neoPhp, because their use in not so clear to me (except "neoPhpExecSql and neoPhpPath), thank you !
Best regards,

@cdy44-2 I know it's necessary but really can't find the time to do it.
There is also a tutorial for saving and reading files on the server:

Some users are using most advanced neoPhp commands already, even to manage multiple users logins.
For me it's easier to answer quick questions that planning a full tutorial on this. It would be a quite extensive one as it's necessary to explain how multi-user online apps work.

I will try to do it as soon as I have the opportunity.
Thank you for your patience.

CDY@44 has reacted to this post.
CDY@44

Thank you Luis !!

I’m new and evaluating VisualNeo Web. I want to create multiuser app but don’t know where to start. Say, I want to create phone contact list, where each user must sign in and access their own contact info.

Name: John Doe, Pwd: 12345
Name: Jane Doe, Pwd: 54321

John signed in and see his own contact list. Jane will see her own contact list. The contact list is stored in the server.

I know it is simple for many of you. But as newbie, how do I go about it as I’m new to php and server thing. I tried the demo and watch sample,video, but I’m stuck. I can’t find any multiple-user access samples to learn. Good if anyone can help create simple sample app so I and many newbies can check and understand better.

Thank you.

@whizzy apps with multiple users access are not for newbies. You can use neoPhp plugin to achieve it or, much more easily, the new neoCms plugin with the server side backend script. Right now I can't explain it in detail, sorry. Anyway I will try to add a complete tutorial in the near future.
Thank you very much for your understanding.

Hi @whizzy,

For a quick guide in the meantime:

1.-Introduction and installation of Neocms in the server side

2.-The Neocms example 2 which is the process of user login, simply change the data in proyect -> application Events to your neocms settings. Then play with the design (try to made responsive using flexbox)

3.-Add a collection in neocms to define the fields of the contact database.

4.-See the neocms example 1 to learn how queries are made

Enjoy

we're all new to using neocms (it's a new option in this version), so don't worry about asking

My experimental website uses Neocms as the backend. It doesn't use login, which is what you ask for, but it gives you an idea of what you can do with Neocms and Visualneoweb

luishp and Vadim have reacted to this post.
luishpVadim