Email confirmation on registration

I had to implement this for a client site and ended up creating my own system. I hash the email and date created timestamp and store it as a key in usermeta, then i email that key to the user’s email in the form of a link. The link points to a page where I’ve … Read more

How to remove administrator role in settings -> general -> New User Default Role?

Okay, this looks tricky, but I think it’s possible. The user-new.php file calls wp_dropdown_roles() to output the list of roles. The wp_dropdown_roles() function calls get_editable_roles() to get the list of roles to output. The get_editable_roles() function has a filter, editable_roles. So, you should be able to add a filter for editable_roles, such that, if the … Read more

BuddyPress: Allow only one email domain to register

Finally, I found the solution. Here is the code if anyone has the same issue and want to refer it. Using Action function wf_validate_email_domain() { global $bp; $email = $bp->signup->email; $email_exploded = explode(‘@’, $email); // split on @ and return last value of array (the domain) $domain = array_pop($email_exploded); $email_domains = get_option(‘allowed_email_domains’); $allowed_email_domains = array_map(‘trim’, … Read more

Allowing periods in usernames

There is a plugin for this. It is Network Username Restrictions Override. Please remember to check out the FAQ #2 to know how to allow periods in usernames. Let me quote it here… You’ll have to update the regular expressions in your .htaccess file if you use email addresses or periods in site URLs. The … Read more

What should I do to make generated avatars different for anonymous comments?

There are two ways to customize the default avatar: Add a new default avatar to Settings/Discussion. Change the output of get_avatar(). Let’s start with the first option; this processes slightly faster. Add a new default avatar to Settings/Discussion There is a filter ‘avatar_defaults’. You can add more avatars here. You get an array of default … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)