<p dir="auto">Users controller has a <code class="notranslate">save_new_user</code> method. Its entire body is wrapped by <code class="notranslate">if check_signup_allowed(current_user.email)</code>.</p>
<p dir="auto">There's only one place where <code class="notranslate">save_new_user</code> is called. It's also wrapped by <code class="notranslate">if check_signup_allowed(current_user.email)</code>:</p>
<p dir="auto"><a href="https://github.com/openstreetmap/openstreetmap-website/blob/e3c919275818d46a515c183cf373d7a53bc6942a/app/controllers/users_controller.rb#L90-L105">https://github.com/openstreetmap/openstreetmap-website/blob/e3c919275818d46a515c183cf373d7a53bc6942a/app/controllers/users_controller.rb#L90-L105</a></p>
<p dir="auto">Why do we need to call <code class="notranslate">check_signup_allowed</code> both inside and outside of <code class="notranslate">save_new_user</code>?</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/4960'>https://github.com/openstreetmap/openstreetmap-website/pull/4960</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4960/commits/4e01f6830a335df4a5ba4420033f60cf0c9c7464" class="commit-link">4e01f68</a> Don't call check_signup_allowed inside save_new_user</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4960/files">1 file</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4960/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e">app/controllers/users_controller.rb</a>
(54)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4960.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/4960.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4960.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/4960.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4960">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPWUZUFGXZXC2HFEHDZLAIOPAVCNFSM6AAAAABKORQAGKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4TGNRRGI4TMMI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLK72U7TXTK75G3GENLZLAIOPA5CNFSM6AAAAABKORQAGKWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHI5K5CUE.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/4960</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/4960",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4960",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>