Code

Discussion on Vanguard - Advanced PHP Login and User Management

loshMiS supports this item

Supported

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

1033 comments found.

ash2916

ash2916 Purchased

I’m not sure how to send the curl request using PHP. It would be great if you can provide me with a sample php code to make a login request. This is the code I have right now:

<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL,”https://mywebsite.com/api/login”);

curl_setopt($ch, CURLOPT_HTTPHEADER, array(

'Accept: application/json',
'Content-Type: application/json',
'Authorization: Bearer {qFRRHe1XBlQGr3qOQuzX}'

));

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array(“username”=>”admin”,”password”=>”my_pass#word”,”device_name”=>”My device”)));

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$server_output = curl_exec($ch);

curl_close ($ch);

echo $server_output;

?>

It gives me the following error:

{message given data was invalid.”,errors username field is required.”],password password field is required.”],device_name device name field is required.”]}}

When I tried other requests that wasn’t user authentication, I received an error saying “Unauthorized”.

It would be great if you can help me with this as soon as possible.

Is it possible to use email confirmation, and after that, admin confirmation before a user can login?

Let me explain a bit.

I have a form, it’s protected by a user management system, but that has to little options so I want to replace it with something more future proof. The form only need the userID of the logged in user and everything else will work. Is a PHP form.

Can I just wrap this program around it? And can you be hired for some alterations?

And last but not least… Can we also use something else than Authy for 2FA? Because Authy costs money :(

Hey,

Thanks for asking but, unfortunately, I’m not available for any custom work at the moment.

Yes, what you’ve described above can be easily achieved with Vanguard. Authy is the default option for 2FA and, unfortunately, there is no way to change it without modifying the code, so I’d recommend you to buy this script either if you are familiar with Laravel or if you have some developer to do the necessary modifications for you.

Kind regards,

Milos

I purchased this package yesterday. It installed smoothly, now I have to customize according to my requirements. is it possible to make the “Username” NOT mandatory or just hide/remove it and system works only on email?

How can I get logged in user’s details to use in a new page I am going to create ? I need to get user id, email, name etc.

Hey,

Yes, system will work without the username, but email is mandatory. You can customize the registration form and remove the username completely. Of course, you need to be familiar with Laravel PHP framework to be able to make any customizations to the app.

Please check the following documentation article which explains how you can get the currently authenticated user: https://milos.support-hub.io/articles/using-vanguard-for-existing-website

Regards, Milos

Hello bro, how easy to integrate OTP with your script?

I did see that you used Authy, is it easy to make changes to the login page? can Authy send sms instead of using the app?

I would like to enter the OTP from authy sms instead of authy app when each time a user login. thanks

Hey,

Yes, you can configure Authy to send SMS with an OTP. It’s something that you should configure in the Authy itself and has nothing to do with Vanguard.

Btw, your support for this item has expired. If you have any future questions please renew the support and submit a ticket on https://milos.support-hub.io

Kind regards,

Milos

Please fix Update Users Avatar Error!!

Hi, I think this Class “Vanguard\Http\Controllers\Web\Users\AvatarController” has a problem.

Vanguard\Http\Controllers\Web\Users\AvatarController to method updateExternal

route(‘user.edit’, $user); fix to route(‘users.edit’, $user);

I think others will have problems too. :)

Hey,

Thanks for letting me know. It will be fixed in the next Vanguard version.

Regards,

Milos

Hi, Laravel 8 support?

Hey,

Vanguard still runs on Laravel 7, but Laravel 8 is mature enough now so I’ll make sure to release the update in next week or two.

Regards,

Milos

Hi. How will Laravel 8, with Jetstream and Fortify, change your script when you update?

Hey,

Vanguard uses laravel/ui package for some features under the hood, so nothing will be changed.

Regards,

Milos

are there plans to get this laravel 8?

Hey,

Of course! Laravel 8 version will probably be released early next week.

Regards,

Milos

Hi. The new version documentation tells me to localize the resources/lang/en/log.php file, but I could not find it. Can you show me where is it?

Hey,

The log.php file is now part of the https://github.com/vanguardapp/activity-log plugin.

If you want to customize those language files, you can create a /resources/lang/vendor/user-activity folder and then copy all the files that you want to customize from https://github.com/vanguardapp/activity-log/tree/master/resources/lang folder to your newly created folder by keeping the same folder structure.

I’ve just updated the documentation. Btw, your support for this item has expired. If you have any other questions in the future please extend your support.

Regards,

Milos

barongo Purchased

I was wondering, why didn’t you include jetstream?

Hey,

Jetstream is a great package and some features are overlapping with Vanguard, however it requires either Livewire or Inertia + Vue and those libraries not part of Vanguard so it doesn’t make sense to include them and make things more complex.

Regards,

Milos

Are you thinking to add Discord Login support in the product? It’d be amazing. Thanks!

Hey,

You can easily add any social login provider you want. Please check the following documentation article: https://milos.support-hub.io/articles/adding-a-social-auth-provider-to-vanguard

Regards,

Milos

Cool, I’ll give a try. Thanks for your fast answer!

ReJigged

ReJigged Purchased

I have purchased both Advanced Security and Vanguard (both over 6 months ago so support appears to have ended). I have finally got around to looking at these and want to add to an existing php driven, bootstrap 4 website but I’m unfamiliar with Laravel and I just keep getting Laravel error after Laravel error after Laravel error and pages will not display at all if I try to add Vanguard. Is this not suited to integrating in this way? Does Laravel have to built from the ground up? Is your Advanced Security software better for this? If so, in which way is it less ‘Robust’?

Hey,

Unfortunately you need to be familiar with Laravel to use and customize Vanguard. One thing to understand is that you should not install Laravel and then try to add Vanguard to it because Vanguard already comes with Laravel so everything you need is within the zip file you have downloaded from CodeCanyon.

Depends on what you are trying to do exactly and what features you need. If you need just a simple way to protect your pages then you can go with AS since it is created using pure PHP and should be much easier for you to understand. If you need some features from Vanguard then you should choose Vanguard.

Either way, since your support for both items has expired, if you have any questions in the future, please renew your support.

Kind regards,

Milos

Hello, the app seems interesting and I expect to buy it. I need some clarification: does it create user table? What about if I want to use it with my existing user table and login form?

Hey,

I’ve just replied to your ticket.

Regards,

Milos

by
by
by
by
by
by