1
0
Fork 0

Use Model\Register methods in modules

- Update registration emails to avoid storing the plaintext password in
the register table
- Remove redundant sprintf() when used with L10n::t()
- Remove redundant Systen::baseUrl() with goaway()
This commit is contained in:
Hypolite Petovan 2018-10-14 11:57:28 -04:00
commit 540adaf829
6 changed files with 55 additions and 72 deletions

View file

@ -58,14 +58,9 @@ function invite_post(App $a)
}
if ($invitation_only && ($invites_remaining || is_site_admin())) {
$code = autoname(8) . srand(1000, 9999);
$code = Friendica\Model\Register::createForInvitation();
$nmessage = str_replace('$invite_code', $code, $message);
$r = q("INSERT INTO `register` (`hash`,`created`) VALUES ('%s', '%s') ",
DBA::escape($code),
DBA::escape(DateTimeFormat::utcNow())
);
if (! is_site_admin()) {
$invites_remaining --;
if ($invites_remaining >= 0) {