I need to add another layer or field to the log-in of Drupal, is that possible? Basically, I'd like to modify the Drupal security table to have that 1 field as part of the log-in credentials. I've searched the documentations and haven't found any resources that points me to my questions. I basically need to create a front-end app using Angular JS and will have an extra field for the log-in so not sure how to accomplish this.

I'd appreciate if you can point me to the right direction and what I need to do to get me started. I sincerely appreciate any help you can provide.

Comments

sprite’s picture

You'll want to write a custom module ...

You could use the Super Login module as a base/model, and add the necessary entity and entity field(s) required from visitors to store in the drupal backend.

https://www.drupal.org/project/super_login

You can probably create your own entity type and storage for whatever data you need to keep.

Essentially, people are using the .js app framework of the week to build apps - angular, react, vue, etc. - with Drupal 8 serving as a rich "drupal entity" based backend store, with user/session tables, definable data storage, and more.

There are oodles of video presentations on building apps with angular and drupal 8 on youtube, many of which probably have ideas about the details of implementing what you want:

youtube - "drupal 8" and angular.js

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...

mpabilona’s picture

Hi Sprite, thanks for your inputs. I'm going through the super-login page, and don't find a reference to the security/user tables of Drupal. I think that's where I need to make my modifications right, like, alter the table to add the field that I need to be part of the log-in credentials? Does that sound like the right approach? I wonder with such a big change, whether it's better to just build my own backend since I'll be messing with Drupal's core functionality. This isn't my preferred route though. If you can help me with my approach to using Drupal, I'd sincerely appreciate it. Thank you again.

sprite’s picture

You need to download the source code to the super login module, see how it interacts with drupal core, and then build your own custom module, with similar, but modified and enhanced, functionality.

It also looks like you will need to learn some about - drupal entities - and about drupal module development with PHP and its symfony framework foundations, including programming custom drupal entities.

I doubt that trying to build your own backend like Drupal would be a successful endeavor, since it took an entire team, quite a large team, of PHP developers four years to build Drupal 8.

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...

mpabilona’s picture

Hi Sprite,

Thank you for your advise. I will try it and will let you know what I come up with. I wish there's a way to hire you to help me out with my endeavor. I know this is not the right place to do so, but still I appreciate it. I hope other developers who have the same requirement as I have will find your post useful.

Thank you.