Create user.
abstract public createUser ( eZ\Publish\SPI\Persistence\User $user ) : mixed | ||
$user | eZ\Publish\SPI\Persistence\User | |
Результат | mixed |
/** * Create user. * * @param user $user * * @return mixed */ public function createUser(User $user) { try { return $this->innerGateway->createUser($user); } catch (DBALException $e) { throw new RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new RuntimeException('Database error', 0, $e); } }
/** * Create a user. * * The User struct used to create the user will contain an ID which is used * to reference the user. * * @param \eZ\Publish\SPI\Persistence\User $user * * @return \eZ\Publish\SPI\Persistence\User */ public function create(User $user) { $this->userGateway->createUser($user); return $user; }