Skip to content

Internal: Add setting to limit number of same e-mails - refs #5112 #6381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

christianbeeznest
Copy link
Contributor

No description provided.

Copy link

codeclimate bot commented Jun 24, 2025

Code Climate has analyzed commit 6df344b and detected 0 issues on this pull request.

View more on Code Climate.

*
* @return bool True if limit has been reached, false otherwise.
*/
function api_email_reached_registration_limit(string $email): bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La nueva función debería ir ChamiloHelper (quizás) para dejar de usar código legacy 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sì, es usado por ahora en inscription.php con formvalidator como una regla para el correo, por eso esta como api en legacy, se podria agregar luego con symfony para usarlo en un FormType cuando se cambie la pagina de inscripcion a modo vue/symfony , quedaria como referencia.

Comment on lines +7596 to +7603
$sql = "SELECT COUNT(*) FROM user WHERE email = '".Database::escape_string($email)."'";
$result = Database::query($sql);

if (!$result) {
return false;
}

$count = (int) $result->fetchOne();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debería estar como una función en UserRepository para no usar SQL directamente

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants