mirror of
https://github.com/friendica/friendica
synced 2025-04-22 05:10:10 +00:00
Add new possibility to add a user per console
This commit is contained in:
parent
4d436c10df
commit
f3f764bc39
6 changed files with 230 additions and 77 deletions
|
@ -880,6 +880,21 @@ class User
|
|||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets block state for a given user
|
||||
*
|
||||
* @param int $uid The user id
|
||||
* @param bool $block Block state (default is true)
|
||||
*
|
||||
* @return bool True, if successfully blocked
|
||||
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function block(int $uid, bool $block = true)
|
||||
{
|
||||
return DBA::update('user', ['blocked' => 0], ['uid' => $uid]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends pending registration confirmation email
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue