1

The user accounts in my site are setup as such that they have a username which is unique as well as multiple barcode spans which are also unique. The barcode spans are an unlimited amount of text fields that are added through import when the user requests more materials (in a biological study). In the past the user has been allowed to login with the barcode or the username and of course their password. In porting this to drupal, I am looking to have them input the barcode span into an entityform field and then using rules (I am guessing), return the username and autofill (if possible) the username field in the login form -- is this possible?

Originally I was trying to allow them to login with a custom id (Is it possible to login to Drupal with a custom user field, instead of username/pass?) but that goes a little over my head in implementation.

I am new to drupal stackexchange and haven't used drupal in sometime, so am open to any suggestions or best practices on how to implement.

5
  • Which Rules Condition, Event or Action makes you think that Rules can be of any help here? What is a "barcode span", how does it look like, can you add an example? Why did you tag this question with "entities"? Commented Oct 29, 2016 at 18:38
  • I thought maybe entity API or entity ref query could be helpful but have never used them and don't really know how to use them well. If tagging with entities was wrong, I can remove tag. Was thinking maybe on submit of entity form I add a rule action to validate and then pull username somehow? Barcode span would be like this: A12345A12345 Commented Oct 29, 2016 at 18:41
  • OK, that helps a little bit to better understand your question (merci!). Though I doubt Rules is going to be of any help here. And I don't have any idea about how you may get this to work. I'd be interested to read about some working solution for this. Commented Oct 29, 2016 at 18:47
  • Haha me too! Hoping someone can help as I am at a loss now. But will post whatever solution I come up with assuming I come up w one and someone else doesn't provide it. I was super hopeful you'd have an answer! Hehe Commented Oct 29, 2016 at 18:49
  • Well, it looks like you'll have to think of a way to narrow down your question (as per the "too broad" reason to put it on hold). So edIt your question if you can think of some way to do so. Apart from that, the very only thing I can think of that may possibly (not sure!) be of any help for you is to have a look at the LoginToboggan module (which also seems to have some type of Rules integration). Apart from that: good luck! Commented Oct 30, 2016 at 12:27

0

Browse other questions tagged or ask your own question.