Made user controller working mostly. Not everything is tested but seems good
This commit is contained in:
@@ -141,10 +141,16 @@ abstract class AbstractCommonClubsModelFactory
|
||||
* @param int $id
|
||||
* @return AbstractCommonClubsModel
|
||||
*/
|
||||
public function loadById($id) {
|
||||
public function loadById($id, $throwErr = true)
|
||||
{
|
||||
$arr = $this->loadElements("main.id = " . ((int)$id) );
|
||||
if(sizeof($arr) == 0)
|
||||
throw new ElementNotFoundException();
|
||||
{
|
||||
if($throwErr)
|
||||
throw new ElementNotFoundException();
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
return $arr[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user