change default property in dnn registration form - asp.net

in dotnetnuke registration form , 'user name' , 'password', 'confiremation' and 'e-mail' are requierd. how is it possible to change their properties like other property in profile, for example email not requierd in registration form and become optional.
it is possible to modify
AddField("Email", String.Empty, false, PortalSettings.Registration.EmailValidator, TextBoxMode.SingleLine);
in core , is there any other way ?

On Admin, Site Settings select the User Account Settings tab.
Choose Custom registration form type, and you can select the profile properties that appear on the form. Alter the Required property of profile items to see what is required.
I believe that the minimum that you can get away with for registration is email, provided that you also set the option to use the email address as the user name. You should also require a unique email address by editing web.config.
You can also use the options to require a valid profile for both registration and login.
No core changes are required.
(I should also mention that there are some third party modules that help you customize registration and login. Google around an you will find them.)

Related

Drupal 8 Views: Ignore a contextual filter for admin role

I have a view serving an entity reference field. I need it to:
(1) pull content authored by the currently logged in user,
(2) unless the currently logged-in user has "administrator" role, in which case pull all content.
Currently I have the contextual filter set to "authored by," which works fine for requirement (1). I think I need it to bypass the filter based on role. For "block" or "page" displays, I can just duplicate a display, set permissions for it based on role, and it's seamless. But because this is an entity reference field, I can only specify one display in the field settings. Any ideas?
In Drupal 8 I was able to do this without any contrib module like contextual filters OR.
add the Authored By contextual filter for your entity type
choose provide default value... from logged in user
below in the "when value provided" section select "specify validation criteria
For validator select User ID
check "restrict user based on role"
select your NON-ADMIN roles
for "Action to take if filter value does not validate" select "display all results"
So if viewed by the non-admins is will show only where the logged in user id matches the entity owner. For admins it will show all.

Wordpress: Custom profile form not working in Ultimate member plugin

When I create a custom form for a custom user role using ultimate member plugin, it doesn't work. Only the default profile form works. Please what can be the problem. I need to create different profile forms for different types of users
The cause of this issue is that the original User page only contains the shortcode for the default profile form.
After you create all of your custom profile forms, and assign the relevant roles to each (Form Settings -> Disable Global Settings -> Select Role), you need to add the short codes of all your forms to the User page, just one after another.
UltimateMember will decide which of the forms to display depending on the user's role.
So on the view user page, add the shortcode for the custom form, in addition to the existing default profile form.
It's a bit weird to have multiple shortcodes but it will only show the one for that role.
Also make sure to assign a the Custom Role to the Custom Form, as stated by Michael Rodriguez

adding different types of user accounts in wordpress

I want to add 2 types of users in my wordpress website.I've read this post , but it's not providing any free method.
Multiple User registration forms for different types of users in wordpress
It'll be like "Buyer and Seller" , seller can add auctions and post stuff while buyer can bid. They both would have different access.
I want to verify seller and let them wait until approval while buyer can simply register.
These functions are what "profile builder pro" provide but I don't want to spend on it.
I've tried to use "Ultimate Profile Builder" , but when I add custom fields they don't appear in form.
I've also tried WP registration , it provide very clean forms but problem is that it don't have option to manage different roles - is this possible that I can manage both type of users with single registration form by providing different fields based on role selection(may be i can use radio button for role selection).
It's easy you can learn about all wordpress users types, and whats roles given to all users, below screenshot

anonymous user cannot access conditional fields

On user registration, I want to show a field on "Yes" choice of a radio button. This working fine when I'm logged in as admin. But anonymous user cannot see that field. When I saw the source code of the page, there wasn't any conditional field related js. From permissions, there's only one permission for conditional field "admin conditional field" and even after enabling that permission to anonymous user, still cannot see that field.
I haven't seen the module, but I will recommend using custom module and javascript in that for such small requirement.

Email to node author in Drupal 7

Drupal 7:
I need a module to append a contact form to a node of a specific content type. The form should be configurable and permit to send an email with an attachment to the node author. The form should also have a captcha. The email must not be saved in the database.
Does such module exists or do i need to develop it ?
You should be able to achieve this through the combination of the webform module, CAPTCHA module and a custom module.
Webform defines it's own 'webform' content type, but it also allows you to make other content types webform enabled by visiting 'admin/config/content/webform' and selecting the appropriate content type.
The token module provides node tokens such as nid and title which can be included as a hidden form element, but annoyingly, doesn't include the author as a token.
On the email tab of your webform, it's possible to choose a form component as the email address to send the form results to. I would create a hidden field, leaving the default value blank and then it should be fairly easy to add the node author value to it in a custom module using hook_form_alter (form id can be found by viewing source and looking for the hidden input 'form_id'). You can then use this form component in the email tab to send the results to.
The only thing I can see causing an issue is that there isn't an easy way to stop webform recording the form result in the database - I would imagine this would be achievable in a custom module without too much hassle though.
Yop, there is such a module. It's called Webform. Using Webform you can add a block form under certain node type with predefined fields and let send email directly to the node author.
Download and enable Webform 4.x
Create new from, add desired fields
Under E-mails tab for Address use token [current-page:node:author:mail]
In Form settings tab check Available as block
Configure newly enabled block (show only under certain node type + set restricted pages to the node/*/*)
Do tests
You can find printcreens and more detailed instructions here.

Resources