Overview
Comment:Fix session issue
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA3-256: 0efff9c95bbf40c4c30ad662921616acb4169d800692b68b96a530c285118057
User & Date: bohwaz on 2021-03-30 21:23:40
Other Links: branch diff | manifest | tags
Context
2021-03-30
21:45
Fix collation check-in: 9ecbcbce5c user: bohwaz tags: dev
21:23
Fix session issue check-in: 0efff9c95b user: bohwaz tags: dev
21:21
Fix dirname/basename locale issues check-in: 3dd4c3e1c4 user: bohwaz tags: dev
Changes

Modified src/include/lib/Garradin/Membres/Session.php from [cad7b6bcbf] to [3fd3cc7631].

333
334
335
336
337
338
339













340
341
342
343
344
345
346
	public function editUser($data)
	{
		(new Membres)->edit($this->user->id, $data, false);
		$this->refresh(false);

		return true;
	}














	public function canAccess($category, $permission)
	{
		if (!$this->getUser())
		{
			return false;
		}







>
>
>
>
>
>
>
>
>
>
>
>
>







333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
	public function editUser($data)
	{
		(new Membres)->edit($this->user->id, $data, false);
		$this->refresh(false);

		return true;
	}

	public function getUser()
	{
		$user = parent::getUser();

		// Force refresh of session when it's too old (FIXME: remove at version 1.2+)
		if (!property_exists($this->user, 'perm_users')) {
			$this->refresh();
			$user = $this->getUser();
		}

		return $user;
	}

	public function canAccess($category, $permission)
	{
		if (!$this->getUser())
		{
			return false;
		}