common/models/entities/User.php
public function isPermitted( $permission ) {

		if( is_string( $permission ) ) {

			return in_array( $permission, $this->permissions );
		}
		else {

			$permitted = false;

			foreach( $permission as $perm ) {

				if( in_array( $perm, $this->permissions ) ) {

					$permitted = true;

					break;
				}
			}

			return $permitted;
		}
	}
public function isPermitted( $permission ) {

		if( is_string( $permission ) ) {

			return in_array( $permission, $this->permissions );
		}
		else {

			$permitted = false;

			foreach( $permission as $perm ) {

				if( in_array( $perm, $this->permissions ) ) {

					$permitted = true;

					break;
				}
			}

			return $permitted;
		}
	}
public function isPermitted ( $ permission ) { if ( is_string ( $ permission ) ) { return in_array ( $ permission , $ this -> permissions ) ; } else { $ permitted = false ; foreach ( $ permission as $ perm ) { if ( in_array ( $ perm , $ this -> permissions ) ) { $ permitted = true ; break ; } } return $ permitted ; } }
Check whether given permission is assigned to the user.

@param string $permission Permission slug
@return boolean
Check whether given permission is assigned to the user .