Nominate Users in Drupal 7 - drupal

I am building a portal which handles registrations in a different way.
Step 1 : It requires users to nominate other users based on their email id.
Step 2 : Then the admin approves the user email id ( and probably give in the user name there itself )strong text
Step 3 : An email is sent to the user that the new id has been created and only then the user can login.
Is there a way to accomplish this task ? I read the user module forums but couldn't get the required information.
Thanks in advance :)

Steps 2 and 3 are built-in features of Drupal i.e. admin users can create user accounts and notify them about their newly created accounts. For step 1 you may consider the Webform module (http://drupal.org/project/webform). Create a webform for authenticated users where they can put email addresses and submit.

Related

Is it possible to get login history of user in Drupal 8

i have a user login panel in drupal 8 where i need to print a banner when user has been logged after 3 months, but when i access user last login iam getting current login, how is it possible in drupal 8?
You can check this module
https://www.drupal.org/project/login_history
This module adds a new table which stores information about individual user logins, including a timestamp, IP address, user agent information, and whether or not the login was via a reset password link.

Drupal maintain rejected user list and authenticate from among

Im developing a drupal website with multistep approval of users ,after
registration the admin rejects a user an email is sent to the user and the user
is deleted from drupal user table .
I want to perform a action where in after a user is rejected he will be kept in
a new table with the username and email .
If the same user contacts admin,the admin will remove the user from the rejected
users list ,because during registration for second time it should also check for
the user in the rejected user list.
Is i t something that is possible in Drupal?
Any pointers?
Everything is possible except the wooden stove! Show some effort, try something on your own and when you get stuck ask.
There's no out of box solution for this (that I know about it), but what I would do is make custom content type for storing users and use hook functions to insert/check existence of rejected users.
hook that is called when user is deleted:
https://api.drupal.org/api/drupal/modules%21user%21user.api.php/function/hook_user_delete/7.x
hook that is called when node (rejected user) is deleted
https://api.drupal.org/api/drupal/modules!node!node.api.php/function/hook_node_delete/7.x
But maybe your admin can just disable user instead of deleting it as first step - that way wouldn't need that extra table at all.

In meteor how to prevent social logins from creating an account if one is not available?

Currently, by default if I try to use social login in meteor, it will create a new account for the user if one is not available. But I don't want that. Here's what I need :
When the user signup, I need to provide social signup options. When the user signup with the social account, it should come back to the app where I will present the user with a form to enter extra details. I don't want to create an account until those details are filled. I will pull the name and email from social accounts.
At login, if the user have already connected a social account, he will be allowed to login. Otherwise he have to signup first.
How can I implement this behavior in Meteor?
The way I handle this is in Account.validateNewUser
this function validates the user and returns true or false.
but you can add logic to the process.
In my case, I check if the user exists by email:
social logins (except for Twitter) all create a user with email.
the function contains a user object parameter with the user account info
If you do a check using Accounts.findUserByEmail(<email>) you can find if the user has been created previously.
In that case,
there are 2 cases:
user tried to create an account with password, just return true and the rest of the user create process will prompt the user that a user already exists with this email.
if it's a social login, I merge the 2 user objects to make it one, keeping the original _id. then return 'true' to pass the validation process.

Drupal 7 Two users having same roles and permissions but showing different result

There are 2 users having same role and permissions as Super Admin, User A and User B. User A is default super admin from Drupal 7 and User B is created by me, assigned same role to him as Super Admin. On website it shows list of movies. When I create new movie, User A can see its entry in list of movies and can edit or delete it. But when I login using User B, User B can't see the new movie entry in the list. I am new to Drupal.
Master admin (the first admin created during drupal installation - has user id 1) has permissions to do anything on site no matter what role is assigned to him.
Suber-admin(uid 1) have all access ,if any menu /link does not have any hook_perm() integration properly then it always accessible for uid 1 but ot or other.

Implementing OpenId in my custom application where users are created by administrator only

In my asp.net application, users are created by the administrators & those users need to log-in into the system using their own email/password or openid. So what is the best option to implement in this scenario?
I mean, as users can't register them self,do administrator required to associate each openid with the users & what kind of table structure do I need?
And do I also need the log-in interface like that of stackoverflow.com showing multiple types of authentication(default & openid from various providers)?
if the below suits you can set it up this way:-
Have user come up to your site and try logging in.
Do the complete OpenID authentication fetching one pseudonym from OpenID which can be used as a unique user identifier
Once verified , check if the user exists in your database of authorized user. if not , add this to a sperate table of new_users. For the new user , show a message which is akin to "You can login to the site once admin authroizes you"
Provide an interface for admin to look into new_users
Allow admin to authorize the new user. This would move the user to authorized user based on your business criteria
Once authorized , user can login to the site.
P.S: Take a look at http://www.plaxo.com/api/openid_recipe

Resources