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:
parent
123992384b
commit
540adaf829
6 changed files with 55 additions and 72 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue