Developer forum

Forum » Development » Override Username validation

Override Username validation

Nuno Aguiar
Reply

Hi,

 

We have a client with multiple websites and extranet applied:

  • General website
  • Special promotions website A
  • Special promotions website B
  • ...

 

We have 1 extranet group for each site, due to restrictions and so on... Only users with a passoword can access "Special Promotions website X" and the register on it with a new user (username = email).

(I know the password + registration might not be a great feature, but despite my efforts, that's just what the client wants)

 

What our client wants now is to be able to keep the same record, instead of duplicating record. Basically 1 person = 1 user/record. Right now they have to use different emails to register.

 

Limitations:

  • We need the seperate extranet groups, websites and treat them as different

Challenge: 

  • Override Dynamicweb's user validation upon user registration attempt for new records

 

We would then send an email to authenticate username ownership and with a simple link, update the record, the problem is how to override Dynamicweb's default validation process.

 

Any ideas?

 

Nuno


Replies

 
Nicolai Høeg Pedersen
Reply

A user can be a member of as many Groups as you need. Why not use that, so that if a user signs up to page 2, 3 etc you just give the user more memberships?

 

Otherwise make you own login function and call Dynamicweb.Security.ExtranetLogin() from there when you have your credentials.

 

BR Nicolai

 
Nuno Aguiar
Reply

Hi Nicolai,

 

Yes, I want to use that logic.

 

When user lands on page 2 (a different website with similar layout - Special Promotions), he cannot log in (because has no permissions) and cannot register (because username/email is already taken) hence my problem.

 

I think a better approach would be to create a "check email/username" before registration. If the user exists, we can send out and email with a link. When accessed would add the group to that user...

 

Thanks for the input.

 

Nuno

 

 

 

You must be logged in to post in the forum