Email notification to admin when a new user is created

Hi folks,
I’ve configured GitLab to authenticate using external provider (Google).

When a new account is created, this remains blocked until it’s unblocked by an administrator.

The problem is that administrators aren’t notified when a new user is registered and they need to check every day if a new user is registered.

There is any way to configure notifications when a new user is registered?

Thank you!
Jorge.

Is this omnibus-gitlab?

I have configured Gitlab for Google mail and the instructions in the wiki seemed correct to me. You want Admin to receive a notification on new user sign up? I don’t see an option for that in gitlab.rb config file or in the admin ui. Sounds like a reasonable feature request to me.

Maybe you could consider disabling signup and just put a message to say “Requests for access can be sent to gitlabaccess@yourcompany.com

I had manual installation, and then migrated to omnibus installation.

and yes, this is very useful feature.
why? because all new sign-ups creates blocked users and we want manually approve it.

Any update on this? I also think, that this would be a very handy feature.

I had this working until a recent upgrade; then something broke.

Users log in with LDAP credentials. We don’t block new accounts, so the account is active immediately.

A “user_create” system hook should fire when a new user is created that way. I just have a simple PHP script that pulls some info from the json that gets sent and sends an email to admins.

That used to work whether new accounts were blocked or immediately active.

From what I can tell, the user_create system hook firing anymore. It broke sometime around 9.4.

Been a minute. Any updates on this? Seems like a very useful feature to just let die on the side of the road… I would think this to be a core feature of user management from an administrative perspective… Is it left to maybe Service Templates or something of that nature? Just some guidance on whether there are even plans to ever bring this back would be great, regardless of where it is on any roadmap.

Any news on this ?? Would really like to see this feature added !!

As a workaround, if you have access to GitLab installation, you can use a file hook with something like this:

#!/usr/bin/env bash

data="$(jq 'select(.event_name == "user_create")')"
[[ "$data" ]] || exit 0
username="$(echo "$data" | jq -r ".username")"
email="$(echo "$data" | jq -r ".email")"
to="admin@example.domain"
subject="A new user has just logged in"
body="${subject}: ${email}<br><br>You can check it in the admin area: <a href=\"https://gitlab.example.domain/admin/users/${username}\">${username}</a><br><br>---<br>From file hook"
echo "Notify.test_email('$to', '$subject', '$body').deliver_now" | gitlab-rails runner -

Note that you need to install jq on the host.